pub enum Act {
Show 19 variants
Remove(Arg),
Write(Arg),
Read(Arg),
ReadTree(Arg),
Opaque(Arg),
Move {
from: Arg,
to: Arg,
},
Link {
target: Arg,
link: Arg,
},
Chmod {
path: Arg,
mode: Arg,
},
Chown(Arg),
Chdir(Arg),
In(Arg, Vec<Act>),
Script(Arg),
Program(Vec<Arg>),
Code(Language, String),
Unread(String),
Downloaded(String),
Loads(String),
Environment,
Started(Vec<Act>),
}Expand description
What reading code found, in the order the code gives it.
Variants§
Remove(Arg)
rm -rf PATH: a file or a whole tree goes.
Write(Arg)
Writes into a file, makes one, or truncates it.
Read(Arg)
Reads a file (open(path), readFileSync(path), the source of a
copy): judged as cat PATH is, so a key it names is a read of one.
ReadTree(Arg)
Reads a folder and everything under it (TarFile.add, the folder
shutil.make_archive packs): judged as grep -r is, so a folder that
holds a key, or the home directory, is a read of one.
Opaque(Arg)
A path handed to a call the reader does not know: it may read it,
write it or delete it, so the caller cannot take the code for
understood, unless the path is a key, which is judged as cat PATH is.
Move
mv FROM TO.
Link
ln TARGET LINK.
Chmod
chmod MODE PATH; mode is in octal where the code gives a number.
Chown(Arg)
chown OWNER PATH.
Chdir(Arg)
The process moves to another directory: the paths after it are read from there.
In(Arg, Vec<Act>)
What a call that starts a program does, run from the directory its
cwd option names: judged as if the code had moved there first, and
back where it was after.
Script(Arg)
A command line a shell runs: os.system, child_process.exec.
Program(Vec<Arg>)
A program and its arguments, run without a shell: the program first.
Code(Language, String)
Code the code runs from a literal (exec("…")), to be read in its own
language.
Unread(String)
Something the reader cannot follow, as a short piece of the code.
Downloaded(String)
Code loaded from the network (import … from 'https://…'): it is
downloaded and run, and not read.
Loads(String)
Code loaded from a file outside the workspace (require('/tmp/x.js'),
fork('../x.js')), which is not the workspace’s own and is not read.
Environment
A write to the environment of the process itself (os.environ[...] =,
os.putenv, process.env.X =): a program the code starts after it
is given the variable.
Started(Vec<Act>)
What a call that starts a program does, given an environment the code
sets: it may hold a variable that loads code (PYTHONPATH,
NODE_OPTIONS), so the caller cannot take the program for the one it
reads.