(reatime, writetime) = File::stat(filename){Readtime, Writetime} # modify readtime, writetime filename.File::utime(readtime, writetime) |
File::delete(filename) |
File::copy(oldfile, newfile) File::rename(oldfile, newfile) File::move(oldfile, newfile) |
seen = {} files.each(f -> seen{File::stat(f){Device, Inode}}.push!(f) ) seen.to_list.sort.each((dev,ino), l -> if l.size > 1 then # l is a list of filenames for the same file ) |
Dir::open(dirname, Absolute).each(file -> # do something with "{file}" ) |
list = Dir::glob("*.c") |
dirlist.each(dir -> Dir::open(dir, Recursive | Absolute | Depth_only).each(f -> ) ) |
Sys::args.each(dir -> Dir::open(dir, Recursive | Absolute | Depth_first).each(File::delete) ) |
names.each(file -> newname = compute_newname(file) File::rename(file, newname) or warn("Couldn't rename {file} to {newname}: {Sys::errno_string}\n") ) |
File::basename(path) File::dirname(path) |