Ejemplo n.º 1
0
 public Entry(@string name = default, long mtime = default, long uid = default, long gid = default, os.FileMode mode = default, long size = default)
 {
     this.name  = name;
     this.mtime = mtime;
     this.uid   = uid;
     this.gid   = gid;
     this.mode  = mode;
     this.size  = size;
 }
Ejemplo n.º 2
0
 private static (ptr <os.File>, error) openFile(@string name, long flag, os.FileMode perm)
 {
     ptr <os.File> _p0 = default !;
Ejemplo n.º 3
0
 public pathMode(@string path = default, os.FileMode mode = default)
 {
     this.path = path;
     this.mode = mode;
 }
Ejemplo n.º 4
0
 // OpenFile is like os.OpenFile, but returns a locked file.
 // If flag includes os.O_WRONLY or os.O_RDWR, the file is write-locked;
 // otherwise, it is read-locked.
 public static (ptr <File>, error) OpenFile(@string name, long flag, os.FileMode perm) => func((_, panic, __) =>
Ejemplo n.º 5
0
 // WriteFile is like ioutil.WriteFile, but first writes data to an arbitrary
 // file in the same directory as filename, then renames it atomically to the
 // final name.
 //
 // That ensures that the final location, if it exists, is always a complete file.
 public static error WriteFile(@string filename, slice <byte> data, os.FileMode perm)
 {
     error err = default !;