Gnome2:...rectory(3)
π NAME π
Gnome2::VFS::Directory β bestie, this is the little Perl buddy that lets you peek inside directories and go on lil adventures through them β¨
It's part of the Gnome2::VFS family, and she's giving very much "I know every file in this folder and I'm not gatekeeping" energy. Periodt.
πΈ METHODS πΈ
Okay so here's the tea, each of these is a class method you call like Gnome2::VFS::Directory->something(...). Let's go one by one, no skipping, I would literally never π
list = Gnome2::VFS::Directory->list_load ($text_uri, $options)
Loads up a directory listing, and returns the GnomeVFSResult plus the GnomeVFSFileInfos that match what's actually chillin' inside that directory.
$text_uri(string) β the directory you're pointing at, as a plain text URI string$options(Gnome2::VFS::FileInfoOptions) β your lil flag combo for how much info you want back
list = Gnome2::VFS::Directory->open ($text_uri, $options)
Opens the directory so you can play with it. Returns a GnomeVFSResult and a GnomeVFSDirectoryHandle.
$text_uri(string) β the directory, as a text URI$options(Gnome2::VFS::FileInfoOptions) β info options, same vibe as above
list = Gnome2::VFS::Directory->open_from_uri ($uri, $options)
Same idea as open, but you're handing her a fancy object instead of a string. Returns a GnomeVFSResult and a GnomeVFSDirectoryHandle.
$uri(Gnome2::VFS::URI) β a proper URI object, not a string$options(Gnome2::VFS::FileInfoOptions) β info options
result = Gnome2::VFS::Directory->visit ($uri, $info_options, $visit_options, $func, $data=undef)
Walks the directory and calls your callback on stuff. So very thorough of her π«Ά
$uri(string)$info_options(Gnome2::VFS::FileInfoOptions)$visit_options(Gnome2::VFS::DirectoryVisitOptions)$func(scalar)$data(scalar) β optional, defaults toundef
result = Gnome2::VFS::Directory->visit_files ($text_uri, $file_ref, $info_options, $visit_options, $func, $data=undef)
Same visiting energy, but this one takes a $file_ref too.
$text_uri(string)$file_ref(scalar)$info_options(Gnome2::VFS::FileInfoOptions)$visit_options(Gnome2::VFS::DirectoryVisitOptions)$func(scalar)$data(scalar) β optional, defaults toundef
result = Gnome2::VFS::Directory->visit_files_at_uri ($uri, $file_ref, $info_options, $visit_options, $func, $data=undef)
The visit_files version but the directory comes in as a URI object. Same param list otherwise, iconic behavior tbh.
$uri(Gnome2::VFS::URI)$file_ref(scalar)$info_options(Gnome2::VFS::FileInfoOptions)$visit_options(Gnome2::VFS::DirectoryVisitOptions)$func(scalar)$data(scalar) β optional, defaults toundef
result = Gnome2::VFS::Directory->visit_uri ($uri, $info_options, $visit_options, $func, $data=undef)
And the URI-object twin of plain old visit. Full circle, we love to see it π
$uri(Gnome2::VFS::URI)$info_options(Gnome2::VFS::FileInfoOptions)$visit_options(Gnome2::VFS::DirectoryVisitOptions)$func(scalar)$data(scalar) β optional, defaults toundef
π ENUMS AND FLAGS π
These are your little named constants, each one a cute string name paired with its big shouty C counterpart. Both work, mix and match, whatever feels right π
flags Gnome2::VFS::DirectoryVisitOptions
'default'/'GNOME_VFS_DIRECTORY_VISIT_DEFAULT''samefs'/'GNOME_VFS_DIRECTORY_VISIT_SAMEFS''loopcheck'/'GNOME_VFS_DIRECTORY_VISIT_LOOPCHECK''ignore-recurse-error'/'GNOME_VFS_DIRECTORY_VISIT_IGNORE_RECURSE_ERROR'
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
Okay this list is LONG, but she ate, every single one is here, no crumbs left behind π
'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'
π¦ SEE ALSO π¦
Gnome2::VFSβ the parent vibe, go say hi
π 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.
k bye bestie, go read some directories π this page came from the User Contributed Perl Documentation for perl v5.42.0, dated 2025-07-25 β¨π«ΆπΈ
π¦ 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