Gnome2:...::Handle(3)
π NAME π
Gnome2::VFS::Handle β bestie, this is your lil' file handle object from the gtk2-perl Gnome2::VFS crew π«Ά it's the thing you hold onto when you wanna read, write, seek around, or just vibe-check a file without caring whether it lives on your disk or on some whole other machine. iykyk π
(this page lives in the User Contributed Perl Documentation section, so you know it's the good stuff)
β¨ METHODS β¨
okay so here's every single thing a Gnome2::VFS::Handle can do for you, no skips, no cuts, we're going through all of them π
result = $handle->closeβ closes the handle, periodt. you get back aresultand that's the whole story πlist = $handle->get_file_info ($options)β grabs the file info, and it takes one thing:$optionsβ aGnome2::VFS::FileInfoOptions(that's the flags enum down below, keep scrolling bestie)
it hands you back a GnomeVFSResult and a GnomeVFSFileInfo. two-for-one, iconic β¨
result = $handle->forget_cache ($offset, $size)β tells the handle to forget a chunk of its cache. it takes:$offsetβ an unsigned value$sizeβ an unsigned value
and it gives you back a result.
Since: vfs 2.12 β so if you're on something older, this one's not showing up for you, sorry babe π
list = $handle->read ($bytes)β the main character of read operations π it takes:$bytesβ an unsigned value
and returns a GnomeVFSResult, the number of bytes read, and the buffer containing the read content. three things. she's generous π
result = $handle->seek ($whence, $offset)β scoots the file position around. it takes:$whenceβ aGnome2::VFS::SeekPosition(start / current / end, see the enums section)$offsetβ an unsigned value
you get a result back. go where you wanna go bestie π
list = $handle->tellβ no arguments, she just tells you where you're at π¦ returns aGnomeVFSResultand the offset. very "where am i in this file" of her.result = $handle->truncate ($length)β chops the file down. it takes:$lengthβ an unsigned value
and returns a result.
list = $handle->write ($buffer, $bytes)β the moment we've all been waiting for, writing π it takes:$bufferβ a string$bytesβ an unsigned value
and returns a GnomeVFSResult and the number of bytes written.
πΈ ENUMS AND FLAGS πΈ
the whole roster, every single one, no gatekeeping π
flags Gnome2::VFS::FileInfoOptions
'default'/'GNOME_VFS_FILE_INFO_DEFAULT''get-mime-type'/'GNOME_VFS_FILE_INFO_GET_MIME_TYPE''force-fast-mime-type'/'GNOME_VFS_FILE_INFO_FORCE_FAST_MIME_TYPE''force-slow-mime-type'/'GNOME_VFS_FILE_INFO_FORCE_SLOW_MIME_TYPE''follow-links'/'GNOME_VFS_FILE_INFO_FOLLOW_LINKS''get-access-rights'/'GNOME_VFS_FILE_INFO_GET_ACCESS_RIGHTS''name-only'/'GNOME_VFS_FILE_INFO_NAME_ONLY''get-acl'/'GNOME_VFS_FILE_INFO_GET_ACL''get-selinux-context'/'GNOME_VFS_FILE_INFO_GET_SELINUX_CONTEXT'
enum Gnome2::VFS::Result
this is the big one bestie, every result code in the game π₯
'ok'/'GNOME_VFS_OK''error-not-found'/'GNOME_VFS_ERROR_NOT_FOUND''error-generic'/'GNOME_VFS_ERROR_GENERIC''error-internal'/'GNOME_VFS_ERROR_INTERNAL''error-bad-parameters'/'GNOME_VFS_ERROR_BAD_PARAMETERS''error-not-supported'/'GNOME_VFS_ERROR_NOT_SUPPORTED''error-io'/'GNOME_VFS_ERROR_IO''error-corrupted-data'/'GNOME_VFS_ERROR_CORRUPTED_DATA''error-wrong-format'/'GNOME_VFS_ERROR_WRONG_FORMAT''error-bad-file'/'GNOME_VFS_ERROR_BAD_FILE''error-too-big'/'GNOME_VFS_ERROR_TOO_BIG''error-no-space'/'GNOME_VFS_ERROR_NO_SPACE''error-read-only'/'GNOME_VFS_ERROR_READ_ONLY''error-invalid-uri'/'GNOME_VFS_ERROR_INVALID_URI''error-not-open'/'GNOME_VFS_ERROR_NOT_OPEN''error-invalid-open-mode'/'GNOME_VFS_ERROR_INVALID_OPEN_MODE''error-access-denied'/'GNOME_VFS_ERROR_ACCESS_DENIED''error-too-many-open-files'/'GNOME_VFS_ERROR_TOO_MANY_OPEN_FILES''error-eof'/'GNOME_VFS_ERROR_EOF''error-not-a-directory'/'GNOME_VFS_ERROR_NOT_A_DIRECTORY''error-in-progress'/'GNOME_VFS_ERROR_IN_PROGRESS''error-interrupted'/'GNOME_VFS_ERROR_INTERRUPTED''error-file-exists'/'GNOME_VFS_ERROR_FILE_EXISTS''error-loop'/'GNOME_VFS_ERROR_LOOP''error-not-permitted'/'GNOME_VFS_ERROR_NOT_PERMITTED''error-is-directory'/'GNOME_VFS_ERROR_IS_DIRECTORY''error-no-memory'/'GNOME_VFS_ERROR_NO_MEMORY''error-host-not-found'/'GNOME_VFS_ERROR_HOST_NOT_FOUND''error-invalid-host-name'/'GNOME_VFS_ERROR_INVALID_HOST_NAME''error-host-has-no-address'/'GNOME_VFS_ERROR_HOST_HAS_NO_ADDRESS''error-login-failed'/'GNOME_VFS_ERROR_LOGIN_FAILED''error-cancelled'/'GNOME_VFS_ERROR_CANCELLED''error-directory-busy'/'GNOME_VFS_ERROR_DIRECTORY_BUSY''error-directory-not-empty'/'GNOME_VFS_ERROR_DIRECTORY_NOT_EMPTY''error-too-many-links'/'GNOME_VFS_ERROR_TOO_MANY_LINKS''error-read-only-file-system'/'GNOME_VFS_ERROR_READ_ONLY_FILE_SYSTEM''error-not-same-file-system'/'GNOME_VFS_ERROR_NOT_SAME_FILE_SYSTEM''error-name-too-long'/'GNOME_VFS_ERROR_NAME_TOO_LONG''error-service-not-available'/'GNOME_VFS_ERROR_SERVICE_NOT_AVAILABLE''error-service-obsolete'/'GNOME_VFS_ERROR_SERVICE_OBSOLETE''error-protocol-error'/'GNOME_VFS_ERROR_PROTOCOL_ERROR''error-no-master-browser'/'GNOME_VFS_ERROR_NO_MASTER_BROWSER''error-no-default'/'GNOME_VFS_ERROR_NO_DEFAULT''error-no-handler'/'GNOME_VFS_ERROR_NO_HANDLER''error-parse'/'GNOME_VFS_ERROR_PARSE''error-launch'/'GNOME_VFS_ERROR_LAUNCH''error-timeout'/'GNOME_VFS_ERROR_TIMEOUT''error-nameserver'/'GNOME_VFS_ERROR_NAMESERVER''error-locked'/'GNOME_VFS_ERROR_LOCKED''error-deprecated-function'/'GNOME_VFS_ERROR_DEPRECATED_FUNCTION''error-invalid-filename'/'GNOME_VFS_ERROR_INVALID_FILENAME''error-not-a-symbolic-link'/'GNOME_VFS_ERROR_NOT_A_SYMBOLIC_LINK''num-errors'/'GNOME_VFS_NUM_ERRORS'
enum Gnome2::VFS::SeekPosition
only three, short and sweet, the little icons of the enum world π
'start'/'GNOME_VFS_SEEK_START''current'/'GNOME_VFS_SEEK_CURRENT''end'/'GNOME_VFS_SEEK_END'
π SEE ALSO π
Gnome2::VFSβ go read this one next bestie, it's the parent vibe π
π COPYRIGHT π
Copyright (C) 2003-2007, 2013 by the gtk2-perl team.
This software is licensed under the LGPL. See Gnome2::VFS for a full notice.
and that's the whole page, bestie, you ate it π
β¨ this lil' slice of the docs was brought to you by perl v5.42.0, dated 2025-07-25 β mwah, love you, go read a file π¦π
π¦ where this page comes from
- fedora 43: perl-Gnome2-VFS 1.084-17.fc43 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms