-
-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into 8.2.0-Dev
- Loading branch information
Showing
12 changed files
with
140 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,65 @@ | ||
package sys; | ||
|
||
import flash.filesystem.File in FlashFile; | ||
import lime.utils.Log; | ||
|
||
@:dce | ||
@:coreApi | ||
class FileSystem | ||
{ | ||
public static function exists(path:String):Bool | ||
{ | ||
return false; | ||
return new FlashFile(path).exists; | ||
} | ||
|
||
public static function rename(path:String, newPath:String):Void {} | ||
public static function rename(path:String, newPath:String):Void | ||
{ | ||
new FlashFile(path).moveTo(new FlashFile(newPath)); | ||
} | ||
|
||
public static function stat(path:String):sys.FileStat | ||
{ | ||
Log.warn("stat is not implemented"); | ||
return null; | ||
} | ||
|
||
public static function fullPath(relPath:String):String | ||
{ | ||
return null; | ||
var flashFile = new FlashFile(relPath); | ||
flashFile.canonicalize(); | ||
return flashFile.nativePath; | ||
} | ||
|
||
public static function absolutePath(relPath:String):String | ||
{ | ||
return null; | ||
return new FlashFile(relPath).nativePath; | ||
} | ||
|
||
public static function isDirectory(path:String):Bool | ||
{ | ||
return false; | ||
return new FlashFile(path).isDirectory; | ||
} | ||
|
||
public static function createDirectory(path:String):Void {} | ||
public static function createDirectory(path:String):Void | ||
{ | ||
new FlashFile(path).createDirectory(); | ||
} | ||
|
||
public static function deleteFile(path:String):Void {} | ||
public static function deleteFile(path:String):Void | ||
{ | ||
new FlashFile(path).deleteFile(); | ||
} | ||
|
||
public static function deleteDirectory(path:String):Void {} | ||
public static function deleteDirectory(path:String):Void | ||
{ | ||
new FlashFile(path).deleteDirectory(false); | ||
} | ||
|
||
public static function readDirectory(path:String):Array<String> {} | ||
public static function readDirectory(path:String):Array<String> | ||
{ | ||
return new FlashFile(path).getDirectoryListing().map(function(f:FlashFile):String | ||
{ | ||
return f.name; | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.