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; }
private static (ptr <os.File>, error) openFile(@string name, long flag, os.FileMode perm) { ptr <os.File> _p0 = default !;
public pathMode(@string path = default, os.FileMode mode = default) { this.path = path; this.mode = mode; }
// 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, __) =>
// 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 !;