Note: Glee is experimental. Glee's handling of Files and File Contexts is very experimental. My objective for handling files is to have a separate process that owns the file and services requests. To implement this, Glee must be able to spawn processes (it can't do that yet). With such a design, the process (and associated Glee programs )can take total control of FC and File access. This removes many of the issues related to file sharing, security, authorization, accounting, etc. and their implementation on various platforms. Glee managed Files and File Contexts will give exclusive, non-shared, full rights access to the process. For now, what is described here may or may not exist at various points in time and may or may not be contained in a supported edition of Glee. What is going on here is software sculpture and tunneling.
This interem solution to Glee's handling of files has built in protection for Paths. Glee will only manage files (i.e. create them, write to them, and destroy them) if they exist off of the root FC "c:\glee\user\". Some of the Glee functionality is very powerful and forceful (e.g. .purge) and an error in programming could cause major chaos on the computer if this restriction was not employed in this experimental stage. A supported version of Glee will relax this restriction and move it into the user managed domain giving more complete access to the computer's (and network's) resources under Glee system control.
Keys: D: Dyadic; M: Monadic; N: Niladic
File Context Operators: (click for examples & comments) | ||||||||
---|---|---|---|---|---|---|---|---|
N | =>#FC | Change CWD | M | #FC | File Context | |||
D | , | Catenate | D | =>[] | Change Path | M | [] | Index |
M | <- | Relative Path Part | M | <<- | Absolute Path Part | M | * | Touch |
D | <- n | Relative Path Part | D | <<- n | Absolute Path Part | M | ** | Touch Deep |
M | -> | Relative Name Part | M | ->> | Absolute Name Part | M | ~ | Delete |
D | -> n | Relative Path and Name Part | D | ->> n | Absolute Path and Name Part | M | ~** | Delete Deep |
D | file -> FC | Copy File | D | file ->> FC | Move File | |||
D | FC -> FC | Copy FC | D | FC ->> FC | Move FC |
File Context Methods and Properties: | ||||||||
---|---|---|---|---|---|---|---|---|
: | List properties and methods | |||||||
:all | List all elements (Files and File Contexts) | |||||||
:create | Create the path | |||||||
:cwd | Display Current Working Directory (CWD) | |||||||
:exists | File Context Exists | |||||||
:ext | Extension part of name | |||||||
:fc | File context | |||||||
:fcs | List File Contexts | |||||||
:files | List Files | |||||||
:fname | :name and :ext part | |||||||
:fpath | Full Path | |||||||
:isabs | Path is absolute | |||||||
:isempty | Path for FC contains no files or directories | |||||||
:name | Name part of path | |||||||
:path | File context path | |||||||
:purge | Remove all files and directories from FC | |||||||
:string | Convert to string | |||||||
:stringv | Convert to verbose string | |||||||
:tree | Sequence containing full FC tree (directories) | |||||||
:treefull | Sequence containing full FC tree (files and dirs) | |||||||
:typec | Character type designation | |||||||
:typen | Numeric type designation |