-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileSystem.es
More file actions
114 lines (90 loc) · 3.11 KB
/
FileSystem.es
File metadata and controls
114 lines (90 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
FileSystem.es -- FileSystem class
Copyright (c) All Rights Reserved. See details at the end of the file.
*/
module ejs {
/**
The FileSystem objects provide global information about a file systems.
@spec ejs
@stability prototype
*/
class FileSystem {
use default namespace public
// TODO - getter
/**
Get a list of file system drives
@return An array of drives. Returns an empty list on systems without drive specifiers in filenames.
*/
native static function drives(): Array
/**
Create a new FileSystem object for the file system that contains the given path.
@param path String or Path of a file that would reside in the file system.
*/
native function FileSystem(path: Path? = null)
/**
Are path names on this file system case sensitive. ie. are uppercase and lowercase path names equivalent
*/
#FUTURE
native function get caseSensitive(): Boolean
/**
Do path names on this file system preserve case
*/
#FUTURE
native function get casePreserved(): Boolean
/**
Free space in the file system in 1M blocks (1024 * 1024 bytes).
*/
#FUTURE
native function get space(): Number
/**
Do path names on this file system support a drive specifications.
*/
native function get hasDrives(): Boolean
/**
Is the file system available, mounted and ready for use
*/
#FUTURE
native function get isReady(): Boolean
/**
Is the file system is writable
*/
#FUTURE
native function get isWritable(): Boolean
/**
The new line characters for this file system. Usually "\n" or "\r\n".
*/
native function get newline(): String
/** */
native function set newline(terminator: String): Void
/**
Path to the root directory of the file system
*/
native function get root(): Path
/**
Path directory separators. The first character is the default separator. Usually "/" or "\\".
*/
native function get separators(): String
/** */
native function set separators(sep: String): Void
/**
The total size of the file system in of 1M blocks (1024 * 1024 bytes).
*/
#FUTURE
native function get size(): Number
}
}
/*
@copy default
Copyright (c) Embedthis Software. All Rights Reserved.
This software is distributed under commercial and open source licenses.
You may use the Embedthis Open Source license or you may acquire a
commercial license from Embedthis Software. You agree to be fully bound
by the terms of either license. Consult the LICENSE.md distributed with
this software for full details and other copyrights.
Local variables:
tab-width: 4
c-basic-offset: 4
End:
vim: sw=4 ts=4 expandtab
@end
*/