You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: case_utils/case_file/__init__.py
+70-16Lines changed: 70 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@
15
15
This module creates a graph object that provides a basic UCO characterization of a single file. The gathered metadata is among the more "durable" file characteristics, i.e. characteristics that would remain consistent when transferring a file between locations.
16
16
"""
17
17
18
-
__version__="0.4.0"
18
+
__version__="0.5.0"
19
19
20
20
importargparse
21
21
importdatetime
@@ -27,7 +27,7 @@
27
27
28
28
importrdflib
29
29
30
-
importcase_utils
30
+
importcase_utils.inherent_uuid
31
31
fromcase_utils.namespaceimport (
32
32
NS_RDF,
33
33
NS_UCO_CORE,
@@ -49,6 +49,8 @@ class HashDict(typing.NamedTuple):
49
49
sha1: str
50
50
sha256: str
51
51
sha512: str
52
+
sha3_256: str
53
+
sha3_512: str
52
54
53
55
54
56
defcreate_file_node(
@@ -58,6 +60,9 @@ def create_file_node(
58
60
node_prefix: str=DEFAULT_PREFIX,
59
61
disable_hashes: bool=False,
60
62
disable_mtime: bool=False,
63
+
*args: typing.Any,
64
+
use_deterministic_uuids: bool=False,
65
+
**kwargs: typing.Any,
61
66
) ->rdflib.URIRef:
62
67
r"""
63
68
This function characterizes the file at filepath.
@@ -68,7 +73,7 @@ def create_file_node(
68
73
:param filepath: The path to the file to characterize. Can be relative or absolute.
69
74
:type filepath: str
70
75
71
-
:param node_iri: The desired full IRI for the node. If absent, will make an IRI of the pattern ``ns_base + 'file-' + uuid4``
76
+
:param node_iri: The desired full IRI for the node. If absent, will make an IRI of the pattern ``ns_base + 'File-' + uuid``
72
77
:type node_iri: str
73
78
74
79
:param node_prefix: The base prefix to use if node_iri is not supplied.
0 commit comments