Skip to content

Commit e4b01c3

Browse files
author
Andreas Dieckmann
committed
FileSystem.FileLastAccessed - saved in JSON format
1 parent 609e7ff commit e4b01c3

File tree

1 file changed

+173
-36
lines changed

1 file changed

+173
-36
lines changed
Lines changed: 173 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,173 @@
1-
<Workspace Version="1.3.4.6666" X="219.089711464969" Y="206.93145193315" zoom="1.59077689706107" ScaleFactor="1" Name="FileSystem.FileLastAccessed" Description="Returns the date and time a given file was last accessed" ID="488c904d-d7ae-4c39-b199-ee2d86d5051e" Category="Clockwork.ImportExport.Query">
2-
<NamespaceResolutionMap>
3-
<ClassMap partialName="File" resolvedName="DSCore.IO.File" assemblyName="DSCoreNodes.dll" />
4-
<ClassMap partialName="System.IO.FileInfo" resolvedName="System.IO.FileInfo" assemblyName="" />
5-
</NamespaceResolutionMap>
6-
<Elements>
7-
<PythonNodeModels.PythonNode guid="8a708e01-88d4-4c87-a1e5-9e3cf31c7440" type="PythonNodeModels.PythonNode" nickname="Python Script" x="305.5" y="0" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="False" IsFrozen="false" isPinned="false" inputcount="1">
8-
<PortInfo index="0" default="False" />
9-
<Script>import clr
10-
11-
def FileLastAccessed(file):
12-
if hasattr(file,"LastAccessTime"): return file.LastAccessTime
13-
else: return None
14-
15-
if isinstance(IN[0], list): OUT = [FileLastAccessed(x) for x in IN[0]]
16-
else: OUT = FileLastAccessed(IN[0])</Script>
17-
</PythonNodeModels.PythonNode>
18-
<Dynamo.Graph.Nodes.CustomNodes.Symbol guid="c13766ed-1d87-46b6-88da-95a9fb9ef5e6" type="Dynamo.Graph.Nodes.CustomNodes.Symbol" nickname="Input" x="-80.5" y="0" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="True" IsFrozen="false" isPinned="false">
19-
<Symbol value="file : System.IO.FileInfo[]..[]" />
20-
</Dynamo.Graph.Nodes.CustomNodes.Symbol>
21-
<Dynamo.Graph.Nodes.CustomNodes.Output guid="d15e3067-f552-4f13-8a4c-2511fe85ec9f" type="Dynamo.Graph.Nodes.CustomNodes.Output" nickname="Output" x="529.5" y="0" isVisible="true" isUpstreamVisible="true" lacing="Disabled" isSelectedInput="False" IsFrozen="false" isPinned="false">
22-
<PortInfo index="0" default="False" />
23-
<Symbol value="dateTime" />
24-
</Dynamo.Graph.Nodes.CustomNodes.Output>
25-
</Elements>
26-
<Connectors>
27-
<Dynamo.Graph.Connectors.ConnectorModel start="8a708e01-88d4-4c87-a1e5-9e3cf31c7440" start_index="0" end="d15e3067-f552-4f13-8a4c-2511fe85ec9f" end_index="0" portType="0" />
28-
<Dynamo.Graph.Connectors.ConnectorModel start="c13766ed-1d87-46b6-88da-95a9fb9ef5e6" start_index="0" end="8a708e01-88d4-4c87-a1e5-9e3cf31c7440" end_index="0" portType="0" />
29-
</Connectors>
30-
<Notes />
31-
<Annotations />
32-
<Presets />
33-
<Cameras>
34-
<Camera Name="Hintergrundvorschau" eyeX="-17" eyeY="24" eyeZ="50" lookX="12" lookY="-13" lookZ="-58" upX="0" upY="1" upZ="0" />
35-
</Cameras>
36-
</Workspace>
1+
{
2+
"Uuid": "488c904d-d7ae-4c39-b199-ee2d86d5051e",
3+
"IsCustomNode": true,
4+
"Category": "Clockwork.ImportExport.Query",
5+
"Description": "Returns the date and time a given file was last accessed",
6+
"Name": "FileSystem.FileLastAccessed",
7+
"ElementResolver": {
8+
"ResolutionMap": {
9+
"File": {
10+
"Key": "DSCore.IO.File",
11+
"Value": "DSCoreNodes.dll"
12+
},
13+
"System.IO.FileInfo": {
14+
"Key": "System.IO.FileInfo",
15+
"Value": ""
16+
}
17+
}
18+
},
19+
"Inputs": [],
20+
"Outputs": [],
21+
"Nodes": [
22+
{
23+
"ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
24+
"NodeType": "PythonScriptNode",
25+
"Code": "import clr\r\n\r\ndef FileLastAccessed(file):\r\n\tif hasattr(file,\"LastAccessTime\"): return file.LastAccessTime\r\n\telse: return None\r\n\r\nif isinstance(IN[0], list): OUT = [FileLastAccessed(x) for x in IN[0]]\r\nelse: OUT = FileLastAccessed(IN[0])",
26+
"VariableInputPorts": true,
27+
"Id": "8a708e0188d44c87a1e59e3cf31c7440",
28+
"Inputs": [
29+
{
30+
"Id": "f5707837ec1f4ba38845ae131e515d3e",
31+
"Name": "IN[0]",
32+
"Description": "Input #0",
33+
"UsingDefaultValue": false,
34+
"Level": 2,
35+
"UseLevels": false,
36+
"KeepListStructure": false
37+
}
38+
],
39+
"Outputs": [
40+
{
41+
"Id": "7d3f287d4f58461ab9b117915f0d5a3a",
42+
"Name": "OUT",
43+
"Description": "Ergebnis des Python-Skripts",
44+
"UsingDefaultValue": false,
45+
"Level": 2,
46+
"UseLevels": false,
47+
"KeepListStructure": false
48+
}
49+
],
50+
"Replication": "Disabled",
51+
"Description": "Führt ein eingebettetes IronPython-Skript aus."
52+
},
53+
{
54+
"ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Symbol, DynamoCore",
55+
"NodeType": "InputNode",
56+
"Parameter": {
57+
"Name": "file",
58+
"TypeName": "System.IO.FileInfo",
59+
"TypeRank": -1,
60+
"DefaultValue": null,
61+
"Description": ""
62+
},
63+
"Id": "c13766ed1d8746b688da95a9fb9ef5e6",
64+
"Inputs": [],
65+
"Outputs": [
66+
{
67+
"Id": "b723413bfcea4fe5a6a2fbfba7fa63bc",
68+
"Name": "",
69+
"Description": "Symbol",
70+
"UsingDefaultValue": false,
71+
"Level": 2,
72+
"UseLevels": false,
73+
"KeepListStructure": false
74+
}
75+
],
76+
"Replication": "Disabled",
77+
"Description": "Ein Funktionsparameter zur Verwendung mit benutzerdefinierten Blöcken.\r\n\r\nSie können den Typ und den Vorgabewert für den Parameter angeben, z. B.\r\n\r\ninput : var[]..[]\r\nvalue : bool = false"
78+
},
79+
{
80+
"ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Output, DynamoCore",
81+
"NodeType": "OutputNode",
82+
"ElementResolver": null,
83+
"Symbol": "dateTime",
84+
"Id": "d15e3067f5524f138a4c2511fe85ec9f",
85+
"Inputs": [
86+
{
87+
"Id": "b5673becdbbf4651aca382fe064b9a94",
88+
"Name": "",
89+
"Description": "",
90+
"UsingDefaultValue": false,
91+
"Level": 2,
92+
"UseLevels": false,
93+
"KeepListStructure": false
94+
}
95+
],
96+
"Outputs": [],
97+
"Replication": "Disabled",
98+
"Description": "Eine Funktionsausgabe zur Verwendung mit benutzerdefinierten Blöcken"
99+
}
100+
],
101+
"Connectors": [
102+
{
103+
"Start": "7d3f287d4f58461ab9b117915f0d5a3a",
104+
"End": "b5673becdbbf4651aca382fe064b9a94",
105+
"Id": "b3e6fed77e984db384b6e54e9398beaf"
106+
},
107+
{
108+
"Start": "b723413bfcea4fe5a6a2fbfba7fa63bc",
109+
"End": "f5707837ec1f4ba38845ae131e515d3e",
110+
"Id": "d165f290e15a41b4b28a17cc4bbeda79"
111+
}
112+
],
113+
"Dependencies": [],
114+
"Bindings": [],
115+
"View": {
116+
"Dynamo": {
117+
"ScaleFactor": 1.0,
118+
"HasRunWithoutCrash": false,
119+
"IsVisibleInDynamoLibrary": true,
120+
"Version": "2.0.3.8810",
121+
"RunType": "Manual",
122+
"RunPeriod": "1000"
123+
},
124+
"Camera": {
125+
"Name": "Hintergrundvorschau",
126+
"EyeX": -17.0,
127+
"EyeY": 24.0,
128+
"EyeZ": 50.0,
129+
"LookX": 12.0,
130+
"LookY": -13.0,
131+
"LookZ": -58.0,
132+
"UpX": 0.0,
133+
"UpY": 1.0,
134+
"UpZ": 0.0
135+
},
136+
"NodeViews": [
137+
{
138+
"ShowGeometry": true,
139+
"Name": "Python Script",
140+
"Id": "8a708e0188d44c87a1e59e3cf31c7440",
141+
"IsSetAsInput": false,
142+
"IsSetAsOutput": false,
143+
"Excluded": false,
144+
"X": 305.5,
145+
"Y": 0.0
146+
},
147+
{
148+
"ShowGeometry": true,
149+
"Name": "Input",
150+
"Id": "c13766ed1d8746b688da95a9fb9ef5e6",
151+
"IsSetAsInput": false,
152+
"IsSetAsOutput": false,
153+
"Excluded": false,
154+
"X": -80.5,
155+
"Y": 0.0
156+
},
157+
{
158+
"ShowGeometry": true,
159+
"Name": "Output",
160+
"Id": "d15e3067f5524f138a4c2511fe85ec9f",
161+
"IsSetAsInput": false,
162+
"IsSetAsOutput": false,
163+
"Excluded": false,
164+
"X": 529.5,
165+
"Y": 0.0
166+
}
167+
],
168+
"Annotations": [],
169+
"X": 159.47297833131182,
170+
"Y": 263.27413235172287,
171+
"Zoom": 1.7138791189044975
172+
}
173+
}

0 commit comments

Comments
 (0)