package
0.4.188
Repository: https://github.com/haraldrudell/parl.git
Documentation: pkg.go.dev

# Functions

Abs ensures a file system path is fully qualified.
AbsEval returns an absolute path with resolved symlinks - if symlinks are evaluated, the path must exist - non-existing path is checked using punix.IsENOENT(err) - if path is relative, the process’ current directory is used to make path absolute.
AddDirEntry returns an [fs.DirEntry] with [fs.FileInfo] available - error if [os.Lstat] fails.
AddDirEntry returns an [fs.DirEntry] for the target of a symbolic link.
Exists determines if a path exists If the path exists, fileInfo is non-nil if the path does not exist, fileInfo is nil panic on troubles.
Exists2 determines if a path exists - fileInfo non-nil: does exist - isNotExists true, fileInfo nil, err non-nil: does not exist - isNotExist false, fileInfo nil, err non-nil: some error.
No description provided by the author
IsDirectory determines if path exists, is directory or another type of file-system entry - path may be relative, contain symlinks or be unclean - isDirectory is true if path exists and is directory.
No description provided by the author
NewDeferringDirEntry returns [fs.DirEntry] with [fs.FileInfo] deferred - abs is absolute path that maybe does not exist.
NewDirEntryIterator returns a one-level directory iterator - path: directory whose entries should be traversed.
NewIterator returns an iterator for a file-system entry and any child entries if directory - path is the initial path for the file-system walk.
NewIterator returns an iterator for a file-system entry and any child entries if directory - path is the initial path for the file-system walk.
NewRegistry returns a registry of values by absolute path.
NewRoot returns a file-system starting point for traversal - path is as-provided path that may be: - — absolute or relative - — unclean - — contain symlinks.
NewTraverser returns a file-system traverser - typically used via [pfs.Iterator] or [pfs.DirIterator] - path is the initial path.
directoryOrder returns unsorted entries, most with deferred [fs.FileInfo].
No description provided by the author

# Constants

AllModeBits is all known github.com/fsnotify/fsevents.EventFlags.
if path does not exist, return the error [IsDirectory].
if existing path is not directory, return an error [IsDirectory] - symlinks are followed, so a symlink pointing ot directory is ok.
[DirectoryOrder].
a directory whose listing failed [os.Open] [os.File.ReadDir].
the filesystem traversal completed all entries.
a non-symlink non-directory non-error entry.
failure in [os.Lstat] [os.Readlink] [os.Getwd].
do not evaluate symlinks argument to [AbsEval].
a directory or symlink about to be traversed.
a broken symlink [os.Stat].

# Structs

No description provided by the author
DirEntry is the value-type the iterator returns.
DirEntryIterator is a one-level directory iterator.
DirIterator traverses file-system directories.
No description provided by the author
Iterator traverses file-system entries and errors.
Registry stores values that are accessible by index or by absolute path.
ResultEntry is an existing file-system entry, traversal-end marker or an error-entry during file-system traversal - non-error non-end file-system entries have been proven to exist - [ResultEntry.IsEnd] or Reason == REnd indicates end - Reson indicates why the ResultEntry was returned: - [REnd] [REntry] [RSkippable] [RDirBad] [RSymlinkBad] [RError] - — - ResultEntry is a value-container that as a local variable, function argument or result is a tuple not causing allocation by using temporary stack storage - taking the address of a &ResultEntry causes allocation.
Root2 is a file system hierarchy.
Traverser represents a file system that is scanned following symlinks - each file system entry is returned exactly once except: - — error reading a directory returns the directory a second time - directories and symlinks are returned before they are read so that they can be more efficiently skipped by invoking [ResultEntry.Skip] - directory entries are returned in 8-bit character order - returned entries may not exist, such entries have [ResultEntry.Err] non-nil - result.ProvidedPath is based on the initial path and may be relative, unclean and contain symlinks - if [ResultEntry.Err] is nil, Abs is absolute, symlink-free clean path - — - ResultEntry.DirEntry.Info typically invokes [os.Lstat] every time, so this value should be cached - because symlinks may point to parents or separate trees, the file system scan may involve multiple roots which may affect the order of return entries - symlinks are followed and not returned.

# Type aliases

bitfield argument to [IsDirectory] - IsDirectoryNonExistentIsError IsDirectoryNotDirIsError.
Why a directory entry was provided by Traverser - REnd REntry RSkippable RDirBad RSymlinkBad RError.