Exemple #1
0
 public override void Delete()
 {
     if (Exists && FSNative.fs_file_writable(filename, pathid))
     {
         FSNative.fs_file_delete(filename, pathid);
     }
     else
     {
         throw new FileNotFoundException();
     }
 }
        public SourceFileStream(string filename, string options, string pathid)
        {
            NativePtr = FSNative.fs_file_open(filename, options, pathid);
            // Check if something strange has happened
            if (!FSNative.fs_file_is_ok(NativePtr))
            {
                Close();
                throw new FileNotFoundException();
            }

            // Test for writable file AND writable file mode
            writable = FSNative.fs_file_writable(filename, pathid) && (options.Contains("w") || options.Contains("+"));
        }