Types

Functions

DataDrop.clean_file_nameMethod
clean_file_name(name)

Construct a clean file name.

Replace '.', ':', ' ' (dot, colon, space) with underscores.

Example:

s =  clean_file_name("something or other.1=0.5_5:7")
s == "something_or_other_1=0_5_5_7"
source
DataDrop.file_extensionMethod
file_extension(filename)

Extract extension from the string representing a file name.

Expected result:

p = "matrices.dir"
file_extension(p) == ".dir"
p = "matrices.h5"
file_extension(p) == ".h5"
p = "matri.ces.dir"
file_extension(p) == ".dir"
p = "matrices."
file_extension(p) == "."
p = "matrices"
file_extension(p) == ""
source
DataDrop.retrieve_jsonMethod
retrieve_json(j)

Retrieve a dictionary from a JSON file named j.

Example:

d = retrieve_json("myfile.json")
source
DataDrop.retrieve_matrixMethod
retrieve_matrix(fname, mpath)

Retrieve a matrix from file fname.

The matrix data is stored under the path mpath.

Example: Storing a sparse matrix as "/data" with store_matrix("test/matrices/matrix_SInt64.h5f", "/data", d) gives:

julia> f = h5open("test/matrices/matrix_SInt64.h5f", "r")      
�
└─ � data 
   ├─ � I 
   ├─ � J 
   ├─ � V 
   ├─ � matrix_type
   ├─ � ncols      
   └─ � nrows   

Example: Storing a dense matrix under the default path ("/") with store_matrix("matrix_d_Float32.h5", d) gives:

julia> f = h5open("matrix_d_Float32.h5", "r")            
�  
├─ � matrix      
└─ � matrix_type    
source
DataDrop.store_jsonMethod
store_json(j, d)

Store a dictionary d into a JSON file named j.

The dictionary is stored into a JSON file. If the file name fname is supplied without an extension, it is appended the ".json" extension.

source
DataDrop.store_matrixMethod
store_matrix(fname, mpath, matrix::SparseArrays.SparseMatrixCSC{T, Int64}) where {T}

Store a sparse matrix under the path mpath into the file named fname.

The matrix is stored into an HDF5 file. If the file name fname is supplied without an extension, it is appended the ".h5" extension.

source
DataDrop.store_matrixMethod
store_matrix(fname, matrix::SparseArrays.SparseMatrixCSC{T, Int64}) where {T}

Store a sparse matrix into the file named fname.

The matrix is stored into an HDF5 file. If the file name fname is supplied without an extension, it is appended the ".h5" extension.

source
DataDrop.store_valueMethod
store_value(fname, vpath, num)

Store a number or a string into the file named fname under the name vpath.

source
DataDrop.with_extensionMethod
with_extension(filename, ext)

Make sure the file name has the desired extension.

ext can be either with or without the leading dot.

with_extension("fo_1=0_5_5_7", ".ext") == "fo_1=0_5_5_7.ext"
with_extension("fo_1=0_5_5_7", "ext") == "fo_1=0_5_5_7.ext"  
with_extension("fo_1=0_5_5_7.dat", "ext") == "fo_1=0_5_5_7.ext"  
source