Net-LibNFS

 view release on metacpan or  search on metacpan

lib/Net/LibNFS/Filehandle.pm  view on Meta::CPAN

the file pointer’s position.

=head2 $bytecount = I<OBJ>->write( $BUFFER )

Tries to write $BUFFER.

Returns the number of bytes actually written.

=head2 $bytecount = I<OBJ>->pwrite( $OFFSET, $BUFFER )

Analogous to C<pread()> above. Tries to write $BUFFER at $OFFSET.

Returns the number of bytes actually written.

=head2 $cur_offset = I<OBJ>->seek( $OFFSET, $WHENCE )

Seeks the filehandle to $OFFSET from $WHENCE (L<Fcntl>’s C<SEEK_*>
constants).

=head2 $obj = I<OBJ>->fcntl( $COMMAND, @ARGS )

Like L<fcntl(2)>. @ARGS depends on $COMMAND. Returns I<OBJ>.

Currently recognized $COMMAND values are constants from L<Net::LibNFS>:

=over

=item * C<NFS4_F_SETLK> and C<NFS4_F_SETLKW> - @ARGS are:

=over

=item * a type (L<Net::LibNFS>’s C<*LCK> constants)

=item * “whence” (same as for C<seek()> above)

=item * OPTIONAL: the lock’s byte offset from “whence” (default is 0)

=item * OPTIONAL: the lock’s length (default is 0, which means
“until the file’s end”)

=back

=back

=head2 $stat = I<OBJ>->stat()

Like L<fstat(2)>. Returns a L<Net::LibNFS::Stat> instance.

=head2 $obj = I<OBJ>->sync()

Like L<fsync(2)>. Returns I<OBJ>.

=head2 $obj = I<OBJ>->truncate( $LENGTH )

Like L<ftruncate(2)>. Returns I<OBJ>.

=head2 $obj = I<OBJ>->chmod( $MODE )

Like L<fchmod(2)>. Returns I<OBJ>.

=head2 $obj = I<OBJ>->chown( $UID, $GID )

Like L<fchown(2)>. Returns I<OBJ>.

=cut

1;



( run in 1.088 second using v1.01-cache-2.11-cpan-71847e10f99 )