GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
FFI::C::PosixFile(3) User Contributed Perl Documentation FFI::C::PosixFile(3)

FFI::C::PosixFile - Perl interface to C File pointer with POSIX extensions

version 0.15

 use FFI::C::PosixFile;
 
 my $stdout = FFI::C::PosixFile->fdopen(1, "w");
 say $stdout->fileno;  # prints 1

This is a subclass of FFI::C::File which adds a couple of useful POSIX extensions that may not be available on non-POSIX systems. Trying to create an instance of this class will fail on platforms that do not support the extensions.

 my $file = FFI::C::PosixFile->fopen($filename, $mode);

Opens the file with the given mode. See your standard library C documentation for the exact format of $mode.

 my $file = FFI::C::PosixFile->new($ptr);

Create a new File instance object from the opaque pointer. Note that it isn't possible to do any error checking on the type, so make sure that the pointer you are providing really is a C file pointer.

 my $file = FFI::C::PosixFile->fdopen($fd, $mode);

Create a new File instance from a POSIX file descriptor.

 my $fd = $file->fileno;

Returns the POSIX file descriptor for the file pointer.

Graham Ollis <plicease@cpan.org>

This software is copyright (c) 2020-2022 by Graham Ollis.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2022-11-15 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.