示例#1
0
        public override Stream IO_OpenFile(Script script, string filename, Encoding encoding, string mode)
        {
            filename = FileSandbox.ResolvePath(filename);
            var openMode = ParseFileMode(mode);

            return(File.Open(filename, openMode.Mode, openMode.Access));
        }
示例#2
0
 public override void OS_FileDelete(string file)
 {
     file = FileSandbox.ResolvePath(file);
     File.Delete(file);
 }
示例#3
0
 public override void OS_FileMove(string src, string dst)
 {
     src = FileSandbox.ResolvePath(src);
     dst = FileSandbox.ResolvePath(dst);
     File.Move(src, dst);
 }
示例#4
0
 public override bool OS_FileExists(string file)
 {
     return(FileSandbox.TryResolvePath(file, out file) && File.Exists(file));
 }