Moduledirectory-1.3.10.0Haskell2010
System.Directory.Internal
Internal modules are always subject to change from version to version. The contents of this module are also platform-dependent, hence what is shown in the Hackage documentation may differ from what is actually available on your system.
- 11 types
- 94 values
- Packagedirectory-1.3.10.0
- Exports105
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceInternal.hs
Copy data from one handle to another until end of file.
Convert empty paths to the current directory, otherwise leave it unchanged.
Given a list of path segments, expand . and ... The path segments
must not contain path separators.
Check whether the given FileType is considered a directory by the operating system. This affects the choice of certain functions e.g. removeDirectory vs removeFile.
Return whether the given FileType is a link.
Attempt to perform the given action, silencing any IO exception thrown by it.
Convert to the right kind of slashes.
Remove redundant trailing slashes and pick the right kind of slash.
Fallibly converts String to OsString. Only intended to be used on literals.
Similar to normalise but empty paths stay empty.
Fallibly converts OsString to String. Only intended to be used on literals.
Constructors
FileSymbolicLinkPOSIX: either file or directory link; Windows: file link
DirectoryDirectoryLinkWindows only: directory link
Instances6Bounded, Enum, Eq, Ord, Read, Show
Bounded FileTypeDefined in directory-1.3.10.0 · System.Directory.Internal.CommonEnum FileTypeDefined in directory-1.3.10.0 · System.Directory.Internal.CommonEq FileTypeDefined in directory-1.3.10.0 · System.Directory.Internal.CommonOrd FileTypeDefined in directory-1.3.10.0 · System.Directory.Internal.CommonRead FileTypeDefined in directory-1.3.10.0 · System.Directory.Internal.CommonShow FileTypeDefined in directory-1.3.10.0 · System.Directory.Internal.Common
Constructors
Permissionsreadable :: Boolwritable :: Boolexecutable :: Boolsearchable :: Bool
Instances4Eq, Ord, Read, Show
Eq PermissionsDefined in directory-1.3.10.0 · System.Directory.Internal.CommonOrd PermissionsDefined in directory-1.3.10.0 · System.Directory.Internal.CommonRead PermissionsDefined in directory-1.3.10.0 · System.Directory.Internal.CommonShow PermissionsDefined in directory-1.3.10.0 · System.Directory.Internal.Common
Instances1Show
Show WhetherFollowDefined in directory-1.3.10.0 · System.Directory.Internal.Common
Special directories for storing user-specific application data, configuration, and cache files, as specified by the XDG Base Directory Specification.
Note: On Windows, XdgData and XdgConfig usually map to the same directory.
Constructors
XdgDataFor data files (e.g. images). It uses the
XDG_DATA_HOMEenvironment variable. On non-Windows systems, the default is~/.local/share. On Windows, the default is%APPDATA%(e.g.C:/Users/<user>/AppData/Roaming). Can be considered as the user-specific equivalent of/usr/share.XdgConfigFor configuration files. It uses the
XDG_CONFIG_HOMEenvironment variable. On non-Windows systems, the default is~/.config. On Windows, the default is%APPDATA%(e.g.C:/Users/<user>/AppData/Roaming). Can be considered as the user-specific equivalent of/etc.XdgCacheFor non-essential files (e.g. cache). It uses the
XDG_CACHE_HOMEenvironment variable. On non-Windows systems, the default is~/.cache. On Windows, the default is%LOCALAPPDATA%(e.g.C:/Users/<user>/AppData/Local). Can be considered as the user-specific equivalent of/var/cache.XdgStateFor data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in XdgData. It uses the
XDG_STATE_HOMEenvironment variable. On non-Windows sytems, the default is~/.local/state. On Windows, the default is%LOCALAPPDATA%(e.g.C:/Users/<user>/AppData/Local).
Instances6Bounded, Enum, Eq, Ord, Read, Show
Bounded XdgDirectoryDefined in directory-1.3.10.0 · System.Directory.Internal.CommonEnum XdgDirectoryDefined in directory-1.3.10.0 · System.Directory.Internal.CommonEq XdgDirectoryDefined in directory-1.3.10.0 · System.Directory.Internal.CommonOrd XdgDirectoryDefined in directory-1.3.10.0 · System.Directory.Internal.CommonRead XdgDirectoryDefined in directory-1.3.10.0 · System.Directory.Internal.CommonShow XdgDirectoryDefined in directory-1.3.10.0 · System.Directory.Internal.Common
Search paths for various application data, as specified by the XDG Base Directory Specification.
The list of paths is split using System.FilePath.searchPathSeparator,
which on Windows is a semicolon.
Note: On Windows, XdgDataDirs and XdgConfigDirs usually yield the same result.
Constructors
XdgDataDirsFor data files (e.g. images). It uses the
XDG_DATA_DIRSenvironment variable. On non-Windows systems, the default is/usr/local/share/and/usr/share/. On Windows, the default is%PROGRAMDATA%or%ALLUSERSPROFILE%(e.g.C:/ProgramData).XdgConfigDirsFor configuration files. It uses the
XDG_CONFIG_DIRSenvironment variable. On non-Windows systems, the default is/etc/xdg. On Windows, the default is%PROGRAMDATA%or%ALLUSERSPROFILE%(e.g.C:/ProgramData).
Instances6Bounded, Enum, Eq, Ord, Read, Show
Bounded XdgDirectoryListDefined in directory-1.3.10.0 · System.Directory.Internal.CommonEnum XdgDirectoryListDefined in directory-1.3.10.0 · System.Directory.Internal.CommonEq XdgDirectoryListDefined in directory-1.3.10.0 · System.Directory.Internal.CommonOrd XdgDirectoryListDefined in directory-1.3.10.0 · System.Directory.Internal.CommonRead XdgDirectoryListDefined in directory-1.3.10.0 · System.Directory.Internal.CommonShow XdgDirectoryListDefined in directory-1.3.10.0 · System.Directory.Internal.Common
Type representing filenames/pathnames.
This type doesn't add any guarantees over OsString.
Newtype representing short operating system specific strings.
Internally this is either WindowsString or PosixString,
depending on the platform. Both use unpinned
ShortByteString for efficiency.
The constructor is only exported via System.OsString.Internal.Types, since dealing with the internals isn't generally recommended, but supported in case you need to write platform specific code.
Instances9Eq, Ord, Show, Generic, Semigroup, Monoid, …
Eq OsStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesByte equality of the internal representation.
Ord OsStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesByte ordering of the internal representation.
Show OsStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesOn windows, decodes as UCS-2. On unix prints the raw bytes without decoding.
Generic OsStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesSemigroup OsStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesMonoid OsStringDefined in os-string-2.0.8 · System.OsString.Internal.Types"String-Concatenation" for OsString. This is not the same as
(</>).NFData OsStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesLift OsStringDefined in os-string-2.0.8 · System.OsString.Internal.Typestype Rep OsString = D1 ('MetaDataDefined in os-string-2.0.8 · System.OsString.Internal.Types"OsString"
"System.OsString.Internal.Types"
"os-string-2.0.8-7fdb"
'True) (C1 ('MetaCons"OsString"
'PrefixI 'True) (S1 ('MetaSel ('Just"getOsString"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PlatformString)))
Truncate the destination file and then copy the contents of the source file to the destination file. If the destination file already exists, its attributes shall remain unchanged. Otherwise, its attributes are reset to the defaults.
$HOME is preferred, because the user has control over it. However, POSIX
doesn't define it as a mandatory variable, so fall back to getpwuid_r.
Convert a path into an absolute path. If the given path is relative, the current directory is prepended and the path may or may not be simplified. If the path is already absolute, the path is returned unchanged. The function preserves the presence or absence of the trailing path separator.
If the path is already absolute, the operation never fails. Otherwise, the operation may throw exceptions.
Empty paths are treated as the current directory.
On POSIX, equivalent to simplifyPosix.