system.filesystem - Palamecia/mint GitHub Wiki
load system.filesystem
This module provides tools to manage the file system informations.
This enum represent a standard path type that can be used to query a standard path to the file system.
| Constant | Value | Description ||----------|-------|-------------|
| Applications | 8 | An application location like '/usr/bin' or 'C:/Program Files' |
| Cache | 11 | A cache location like '~/.cache' or 'C:/Users/<user>/AppData/Local/Cache' |
| Config | 16 | A configuration location like '~/.config' or 'C:/Users/<user>/AppData/Local/???' |
| Data | 13 | A data location like '~/???' or 'C:/Users/<user>/AppData/Roaming' |
| Desktop | 2 | A desktop location like '~/Desktop' or 'C:/Users/<user>/Desktop' |
| Documents | 3 | A document location like '~/Documents' or 'C:/Users/<user>/Documents' |
| Download | 7 | A download location like '~/Downloads' or 'C:/Users/<user>/Downloads' |
| Fonts | 10 | A font location like '/usr/share/fonts' or 'C:/Windows/Fonts' |
| GlobalCache | 12 | A global cache location like '/var/cache' or 'C:/ProgramData/???' |
| GlobalConfig | 17 | A global configuration location like '/???' or 'C:/ProgramData/???' |
| GlobalData | 15 | A global data location like '/usr/share' or 'C:/ProgramData' |
| Home | 1 | An home location like '~' or 'C:/Users/<user>' |
| LocalData | 14 | A local data location like '~/.local/share' or 'C:/Users/<user>/AppData/Local' |
| Movies | 5 | A document location like '~/Movies' or 'C:/Users/<user>/Movies' |
| Musics | 4 | A music location like '~/Musics' or 'C:/Users/<user>/Musics' |
| Pictures | 6 | A picture location like '~/Pictures' or 'C:/Users/<user>/Pictures' |
| Root | 0 | The system root location like '/' or 'C:' |
| Temporary | 9 | A temporary location like '/tmp' or 'C:/Users/<user>/AppData/Local/Temp' |
This class provides an interface to interact with the file system and access standard locations.
| Modifiers | Member | Description |
|---|---|---|
@ const
|
Separator | Native path separator: "/" under Unix and "" under Windows. |
@ const
|
SeparatorPattern | Pattern used to search for a separator in a path. |
const |
findStandardPath | Returns the most significant existing path under a root that matches the given ``... |
const |
findStandardPaths | Returns an array of each existing path under a root that matches the given type... |
const |
getStandardPath | Returns the most significant path that matches the given type. The type param... |
const |
getStandardPaths | Returns an array of each path that matches the given type. The type parameter... |
| Modifiers | Member | Description |
|---|---|---|
const |
new | Internal constructor. |
| Modifiers | Member | Description |
|---|---|---|
@ const
|
g_lib | Global library handle. |
System.FileSystem ()
Global file system instance
none
Native path separator: "/" under Unix and "" under Windows.
none
Pattern used to search for a separator in a path.
def (const self, % type, path)
Returns the most significant existing path under a root that matches
the given type. The type parameter must be a value from
System.StandardPath.
def (const self, % type, path)
Returns an array of each existing path under a root that matches the
given type. The type parameter must be a value from
System.StandardPath.
lib ('libmint-system')
Global library handle.
def (const self, % type)
Returns the most significant path that matches the given type. The
type parameter must be a value from System.StandardPath.
def (const self, % type, path)
Returns the most significant path with a root that matches the given
type. The type parameter must be a value from System.StandardPath.
def (const self, % type)
Returns an array of each path that matches the given type. The type
parameter must be a value from System.StandardPath.
none
Internal constructor.
8
An application location like '/usr/bin' or 'C:/Program Files'
11
A cache location like '~/.cache' or 'C:/Users/<user>/AppData/Local/Cache'
16
A configuration location like '~/.config' or 'C:/Users/<user>/AppData/Local/???'
13
A data location like '~/???' or 'C:/Users/<user>/AppData/Roaming'
2
A desktop location like '~/Desktop' or 'C:/Users/<user>/Desktop'
3
A document location like '~/Documents' or 'C:/Users/<user>/Documents'
7
A download location like '~/Downloads' or 'C:/Users/<user>/Downloads'
10
A font location like '/usr/share/fonts' or 'C:/Windows/Fonts'
12
A global cache location like '/var/cache' or 'C:/ProgramData/???'
17
A global configuration location like '/???' or 'C:/ProgramData/???'
15
A global data location like '/usr/share' or 'C:/ProgramData'
1
An home location like '~' or 'C:/Users/<user>'
14
A local data location like '~/.local/share' or 'C:/Users/<user>/AppData/Local'
5
A document location like '~/Movies' or 'C:/Users/<user>/Movies'
4
A music location like '~/Musics' or 'C:/Users/<user>/Musics'
6
A picture location like '~/Pictures' or 'C:/Users/<user>/Pictures'
0
The system root location like '/' or 'C:'
9
A temporary location like '/tmp' or 'C:/Users/<user>/AppData/Local/Temp'