Skip to main content

File system

Functions

all_files_under(Charstring folder)->Bag of (Charstring,Charstring)

Get all files somewhere under folder along with their relative path from folder


base_filename(Charstring path)->Charstring

The Unix style file name part of path


cd(Charstring folder)->Charstring

Set current wroking directory


create_folder(Charstring folder)->Charstring

dir(Charstring d)->Bag of Charstring

List files in directory named d. Empty d lists files in current working directory pwd()


dir(Charstring path,Charstring pat)->Bag of Charstring d

List files in directory path whose names match the pattern pat


dir()->Bag of Charstring

List files in current working directory pwd()


directories_in(Charstring f)->Bag of Charstring

Get names of all directories in folder f


directoryp(Charstring path)->Boolean

Is a path a directory?


dirpath(Charstring file)->Charstring

Convert file to Unix style filename ended with a single /


filedate(Charstring file)->Timeval

The time when file was last updated


file_exists(Charstring file)->Boolean

Does file exists?


file_lines(Charstring file)->Number

The number of lines in file


file_path(Charstring nm)->Charstring

The Unix style path to file named nm


find_file(Charstring folder,Charstring file)->Charstring

Get full path to first occurence of file somewhere under folder


folder_of(Charstring path)->Charstring f

The Unix style folder name of path


full_filenames(Charstring f,Charstring pat)->Bag of Charstring

Get the paths to the files in folder f that match pattern pat


load_osql(Charstring file,Charstring tn)->Charstring

Evaluate OSQL statements in file belonging to topic named tn


load_osql(Charstring file)->Charstring

Evaluate OSQL statements in file


popd()->Charstring

Go back to folder before last pushd(path)


pushd(Charstring path)->Charstring

Make path current working directory. Go back with popd()


pwd()->Charstring

The current working directory


read_file(Charstring file)->Charstring

Get contents of file as a string


sa_home()->Charstring

User's home folder


subdirectories(Charstring f)->Bag of Charstring

Get names of all directories under folder f, including f


temp_folder()->Charstring

User's folder for temporary files


write_file(Charstring cont,Charstring filename)->Charstring

Write cont into filename


write_filepath(Charstring cont,Charstring path)->Charstring