You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Look up file system Entry referred to by local URL.
25
+
* Look up file system FileSystemEntry referred to by local URL.
24
26
* @param string url URL referring to a local file or directory
25
-
* @param successCallback invoked with Entry object corresponding to URL
27
+
* @param successCallback invoked with FileSystemEntry object corresponding to URL
26
28
* @param errorCallback invoked if error occurs retrieving file system entry
27
29
*/
28
30
resolveLocalFileSystemURL(url: string,
29
-
successCallback: (entry: Entry)=>void,
30
-
errorCallback?: (error: FileError)=>void): void;
31
+
successCallback: (entry: FileSystemEntry)=>void,
32
+
errorCallback?: (error: FileError)=>void): void;
31
33
/**
32
-
* Look up file system Entry referred to by local URI.
34
+
* Look up file system FileSystemEntry referred to by local URI.
33
35
* @param string uri URI referring to a local file or directory
34
-
* @param successCallback invoked with Entry object corresponding to URI
36
+
* @param successCallback invoked with FileSystemEntry object corresponding to URI
35
37
* @param errorCallback invoked if error occurs retrieving file system entry
36
38
*/
37
39
resolveLocalFileSystemURI(uri: string,
38
-
successCallback: (entry: Entry)=>void,
39
-
errorCallback?: (error: FileError)=>void): void;
40
+
successCallback: (entry: FileSystemEntry)=>void,
41
+
errorCallback?: (error: FileError)=>void): void;
40
42
TEMPORARY: number;
41
43
PERSISTENT: number;
42
44
}
43
45
44
46
/** This interface represents a file system. */
45
-
interfaceFileSystem{
46
-
/* The name of the file system, unique across the list of exposed file systems. */
47
-
name: string;
48
-
/** The root directory of the file system. */
49
-
root: DirectoryEntry;
50
-
}
47
+
// Commented in order to avoid conflicts with lib.dom.d.ts
48
+
// interface FileSystem {
49
+
// /* The name of the file system, unique across the list of exposed file systems. */
50
+
// name: string;
51
+
// /** The root directory of the file system. */
52
+
// root: FileSystemDirectoryEntry;
53
+
// }
51
54
52
55
/**
53
56
* An abstract interface representing entries in a file system,
54
-
* each of which may be a File or DirectoryEntry.
57
+
* each of which may be a File or FileSystemDirectoryEntry.
55
58
*/
56
-
interfaceEntry{
57
-
/** Entry is a file. */
58
-
isFile: boolean;
59
-
/** Entry is a directory. */
60
-
isDirectory: boolean;
59
+
interfaceFileSystemEntry{
60
+
/** FileSystemEntry is a file. */
61
+
// isFile: boolean;
62
+
/** FileSystemEntry is a directory. */
63
+
// isDirectory: boolean;
61
64
/** The name of the entry, excluding the path leading to it. */
62
-
name: string;
65
+
// name: string;
63
66
/** The full absolute path from the root to the entry. */
64
-
fullPath: string;
67
+
// fullPath: string;
65
68
/** The file system on which the entry resides. */
66
-
filesystem: FileSystem;
69
+
// filesystem: FileSystem;
67
70
nativeURL: string;
68
71
/**
69
72
* Look up metadata about this entry.
@@ -82,14 +85,14 @@ interface Entry {
82
85
* A move of a file on top of an existing file must attempt to delete and replace that file.
83
86
* A move of a directory on top of an existing empty directory must attempt to delete and replace that directory.
84
87
* @param parent The directory to which to move the entry.
85
-
* @param newName The new name of the entry. Defaults to the Entry's current name if unspecified.
86
-
* @param successCallback A callback that is called with the Entry for the new location.
88
+
* @param newName The new name of the entry. Defaults to the FileSystemEntry's current name if unspecified.
89
+
* @param successCallback A callback that is called with the FileSystemEntry for the new location.
87
90
* @param errorCallback A callback that is called when errors happen.
88
91
*/
89
-
moveTo(parent: DirectoryEntry,
90
-
newName?: string,
91
-
successCallback?: (entry: Entry)=>void,
92
-
errorCallback?: (error: FileError)=>void): void;
92
+
moveTo(parent: FileSystemDirectoryEntry,
93
+
newName?: string,
94
+
successCallback?: (entry: FileSystemEntry)=>void,
95
+
errorCallback?: (error: FileError)=>void): void;
93
96
/**
94
97
* Copy an entry to a different location on the file system. It is an error to try to:
95
98
* copy a directory inside itself or to any child at any depth;
@@ -101,14 +104,14 @@ interface Entry {
101
104
* A copy of a directory on top of an existing empty directory must attempt to delete and replace that directory.
102
105
* Directory copies are always recursive--that is, they copy all contents of the directory.
103
106
* @param parent The directory to which to move the entry.
104
-
* @param newName The new name of the entry. Defaults to the Entry's current name if unspecified.
105
-
* @param successCallback A callback that is called with the Entry for the new object.
107
+
* @param newName The new name of the entry. Defaults to the FileSystemEntry's current name if unspecified.
108
+
* @param successCallback A callback that is called with the FileSystemEntry for the new object.
106
109
* @param errorCallback A callback that is called when errors happen.
107
110
*/
108
-
copyTo(parent: DirectoryEntry,
109
-
newName?: string,
110
-
successCallback?: (entry: Entry)=>void,
111
-
errorCallback?: (error: FileError)=>void): void;
111
+
copyTo(parent: FileSystemDirectoryEntry,
112
+
newName?: string,
113
+
successCallback?: (entry: FileSystemEntry)=>void,
114
+
errorCallback?: (error: FileError)=>void): void;
112
115
/**
113
116
* Returns a URL that can be used as the src attribute of a <video> or <audio> tag.
114
117
* If that is not possible, construct a cdvfile:// URL.
@@ -126,14 +129,14 @@ interface Entry {
126
129
* @param errorCallback A callback that is called when errors happen.
127
130
*/
128
131
remove(successCallback: ()=>void,
129
-
errorCallback?: (error: FileError)=>void): void;
132
+
errorCallback?: (error: FileError)=>void): void;
130
133
/**
131
-
* Look up the parent DirectoryEntry containing this Entry. If this Entry is the root of its filesystem, its parent is itself.
134
+
* Look up the parent FileSystemDirectoryEntry containing this FileSystemEntry. If this FileSystemEntry is the root of its filesystem, its parent is itself.
132
135
* @param successCallback A callback that is called with the time of the last modification.
133
136
* @param errorCallback A callback that is called when errors happen.
* Creates a new DirectoryReader to read Entries from this Directory.
151
154
*/
152
155
createReader(): DirectoryReader;
153
156
/**
154
157
* Creates or looks up a file.
155
-
* @param path Either an absolute path or a relative path from this DirectoryEntry
158
+
* @param path Either an absolute path or a relative path from this FileSystemDirectoryEntry
156
159
* to the file to be looked up or created.
157
160
* It is an error to attempt to create a file whose immediate parent does not yet exist.
158
161
* @param options If create and exclusive are both true, and the path already exists, getFile must fail.
159
-
* If create is true, the path doesn't exist, and no other error occurs, getFile must create it as a zero-length file and return a corresponding FileEntry.
162
+
* If create is true, the path doesn't exist, and no other error occurs, getFile must create it as a zero-length file and return a corresponding FileSystemFileEntry.
160
163
* If create is not true and the path doesn't exist, getFile must fail.
161
164
* If create is not true and the path exists, but is a directory, getFile must fail.
162
-
* Otherwise, if no other error occurs, getFile must return a FileEntry corresponding to path.
165
+
* Otherwise, if no other error occurs, getFile must return a FileSystemFileEntry corresponding to path.
163
166
* @param successCallback A callback that is called to return the File selected or created.
164
167
* @param errorCallback A callback that is called when errors happen.
0 commit comments