module Place:sig..end
type 'a t
'atype'acodec =('a -> string) Mapred_rfun.rfun *
(string -> int -> int -> 'a) Mapred_rfun.rfun
(coder,decoder) which must both be registered
(rfun). The decoder takes a string and a range with position
and length.typeext_location =[ `Deep_dir of string | `File of string | `Flat_dir of string ]
typelocation =[ `Deep_dir of string | `File of string | `Flat_dir of string | `Notebook ]
val create : ?prefix:string ->
?repl:int ->
Mapred_fs.filesystem ->
'a codec ->
Mapred_toolkit.format ->
Mapred_io.record_config ->
ext_location -> 'a t
prefix: New files will get this prefix (ignored for `File location)val from : ?prefix:string ->
?repl:int ->
Mapred_fs.filesystem ->
'a codec ->
Mapred_toolkit.format ->
Mapred_io.record_config ->
ext_location -> 'a t
prefix: New files will get this prefix (ignored for `File location)val notebook_place : unit -> 'a tval location : 'a t -> locationval get_codec : 'a t -> 'a codecval get_format : 'a t -> Mapred_toolkit.formatval get_fs : 'a t -> Mapred_fs.filesystemval get_rc : 'a t -> Mapred_io.record_configval is_file_place : 'a t -> boolval files : 'a t -> string listval create_file : ?filename:string -> 'a t -> stringcreate_file pl:
Create a new empty file at the place. The file name is automatically
determined, but starts with the previously set prefix. Also,
the file gets a suffix that is derived from the format (".var" or
".fixed<n>").
If the place refers to a `File location, it is only possible to
call create_file once.
This function fails for notebooks.
The optional filename argument influences the filename.
prefix ^ filename ^ suffix does not exist yes,
this file name is chosen. Otherwise:uuid is generated so that
prefix ^ filename ^ uuid ^ suffix is the new fileprefix ^ uuid ^ suffix.val clear : 'a t -> unitfiles function returns.
Note that this excludes ignored files starting with "_" and
".", and files in directories starting with these characters.
Only files are deleted, and the directories are left in place.
This function works for notebook places, and just deletes the notebooks.
For deleting directories entirely, please use
Mapred_io.delete_rec.