@@ -38,14 +38,16 @@ export class FileSystemAccess {
3838
3939 /**
4040 * Gets all entities of a given path (folder)
41- * @param onSuccess A callback function to call if operation is successful
41+ * @param path Path to the file.
4242 * @param onError (optional) A callback function to use if any error occurs.
43+ * Returns an array of entities in the folder.
4344 */
4445 getEntities ( path : string , onError ?: ( error : any ) => any ) : Array < { path : string ; name : string ; extension : string } > ;
4546
4647 /**
4748 * Performs an action onSuccess for every entity in a folder with a given path.
4849 * Breaks the loop if onSuccess function returns false
50+ * @param path Path to the file.
4951 * @param onEntity A callback function which is called for each entity.
5052 * @param onError (optional) A callback function to use if any error occurs.
5153 */
@@ -76,7 +78,7 @@ export class FileSystemAccess {
7678 deleteFolder ( path : string , onError ?: ( error : any ) => any ) ;
7779
7880 /**
79- * Deletes a content of a folder with a given path.
81+ * Deletes all content of a folder with a given path.
8082 * @param path Path of the folder.
8183 * @param onError (optional) A callback function to use if any error occurs.
8284 */
@@ -97,7 +99,7 @@ export class FileSystemAccess {
9799 getDocumentsFolderPath ( ) : string ;
98100
99101 /**
100- * Gets the special documents folder.
102+ * Gets the special temp folder.
101103 * Returns for Android: "/data/data/applicationPackageName/cache", iOS: "/var/mobile/Applications/appID/Library/Caches"
102104 */
103105 getTempFolderPath ( ) : string ;
@@ -116,25 +118,24 @@ export class FileSystemAccess {
116118 /**
117119 * Reads a text from a file with a given path.
118120 * @param path The path to the source file.
119- * @param onSuccess A callback function which is called when a text is red.
120121 * @param onError (optional) A callback function to use if any error occurs.
121122 * @param encoding (optional) If set reads the text with the specified encoding (default UTF-8).
123+ * Returns the text read.
122124 */
123125 readText ( path : string , onError ?: ( error : any ) => any , encoding ?: any ) : string ;
124126
125127 /**
126128 * Reads a binary content from a file with a given path.
127129 * @param path The path to the source file.
128- * @param onSuccess A callback function which is called when a text is red.
129130 * @param onError (optional) A callback function to use if any error occurs.
131+ * Returns the binary content read.
130132 */
131133 read ( path : string , onError ?: ( error : any ) => any ) : any ;
132134
133135 /**
134136 * Writes a text to a file with a given path.
135137 * @param path The path to the source file.
136138 * @param content The content which will be written to the file.
137- * @param onSuccess (optional) A callback function which is called when a text is written.
138139 * @param onError (optional) A callback function to use if any error occurs.
139140 * @param encoding (optional) If set writes the text with the specified encoding (default UTF-8).
140141 */
@@ -144,7 +145,6 @@ export class FileSystemAccess {
144145 * Writes a binary to a file with a given path.
145146 * @param path The path to the source file.
146147 * @param content The content which will be written to the file.
147- * @param onSuccess (optional) A callback function which is called when a text is written.
148148 * @param onError (optional) A callback function to use if any error occurs.
149149 */
150150 write ( path : string , content : any , onError ?: ( error : any ) => any ) ;
@@ -168,14 +168,17 @@ export class FileSystemAccess {
168168 normalizePath ( path : string ) : string ;
169169
170170 /**
171- * Join two paths (without normalize) only removes some trailing and dublicating path separators.
171+ * Joins two paths (without normalize). Only removes some trailing and duplicate path separators.
172172 * @param left First path to join.
173173 * @param right Second path to join.
174+ * Returns the joined path.
174175 */
175176 joinPath ( left : string , right : string ) : string ;
176177
177178 /**
178179 * Joins an array of file paths.
180+ * @param paths An array of paths.
181+ * Returns the joined path.
179182 */
180183 joinPaths ( paths : string [ ] ) : string ;
181184}
0 commit comments