file¶
A file to include in the scie.
Files are generally embedded in the scie executable and extracted as needed at run-time using
a concurrency-safe file system cache. Archives are unpacked unless the file type is marked
'blob'
name¶
type: String
The name of the file.
This will usually be the actual file name or the relative path to a file, but it can also be an abstract name. If the file name is not a relative path there are two things to note:
If the file
type
is not explicitly set, it will be inferred from the extension unless the file resolves as a directory, in which case it will have type'directory'
.The file will need to be mapped via the
science lift --file <name>=<path> ...
option at build-time.
key¶
type: String (Optional)
An alternate name for the file.
The key can be used in place of the name
in {<name>}
or {scie.file.<name>}
placeholders in command
fields or when mapping the the file using
the science lift --file <name>=<path> ...
option at build-time.
digest¶
type: digest
(Optional)
The expected digest of the file.
The digest will be checked at scie build-time if the file has no source
and it will be
checked again upon extraction from the scie at runtime.
type¶
type: ‘blob’ | ‘directory’ | ‘zip’ | ‘tar’ | ‘tar.gz’ | ‘tar.bz2’ | ‘tar.xz’ | ‘tar.Z’ | ‘tar.zst’ (Optional)
The file type expected.
Note
Can be set to 'blob'
to turn off automatic extraction of recognised
archive types.
is_executable¶
type: Boolean
default: false
Is the file an executable.
This is auto-detected if the file has no source
but must be set if the file is an
executable that is provided by a source
. This has no effect for Windows platform
scies.
eager_extract¶
type: Boolean
default: false
Extract the file from the scie upon first execution of the scie.
Although files are automatically extracted when referenced directly or indirectly by
placeholders in the scie command
selected for execution, the scie
may have other un-referenced files used by other commands that you wish to be extracted
eagerly anyhow.
source¶
type: source
| String (Optional)
A source for the file’s byte content.
Normally files are expected to be found locally at scie build-time, but you may want
science to fetch them for you as a convenience at build time or you may want the scie
to fetch them lazily at run-time. Specifying a source
table can
accomplish either.
For more exotic cases the source can be a string that is the name of a binding
command
that accepts the name
of the file as its sole argument
and produces the file’s byte content on stdout.