owmeta_core.data_trans.local_file_ds module¶
- class owmeta_core.data_trans.local_file_ds.CommitOp(value)[source]¶
Bases:
Enum
Indicates which operation to perform for “commiting” a local file. See
LocalFileDataSource
.- COPY = 2¶
copy the source file contents to the target file
- HARDLINK = 4¶
create a hard-link to the file. This will not be valid in case the source and target file are on different file systems.
- RENAME = 1¶
rename the source file to the target file
- SYMLINK = 3¶
create a symbolic link to the file. This may not be allowed for unprivileged users on Windows machines
- class owmeta_core.data_trans.local_file_ds.LocalFileDataSource(*args, no_type_decl=False, **kwargs)[source]¶
Bases:
CapableConfigurable
,FileDataSource
File paths should be relative – in general, path names on a given machine are not portable
- Attributes
- commit_op
CommitOp
The operation to use for commiting the file changes
- commit_op
- Parameters
- after_transform()[source]¶
“Commits” the file by applying the operation indicated by
commit_op
tosource_file_path
so that it is accessible atfull_path
- file_contents()[source]¶
Returns an open file to be read from at
<full_path>/<file_name>
This file should be closed when you are done with it. It may be used as a context manager
- file_output()[source]¶
Returns an open file to be written to at
<full_path>/<file_name>
This file should be closed when you are done with it. It may be used as a context manager
- file_name¶
“File name”, a
DatatypeProperty
- torrent_file_name¶
“Torrent file name”, a
DatatypeProperty