Skip to content

Commit 4cb2e41

Browse files
author
Julian
authored
Merge pull request #3 from CENTIS-HTW/develop
feat: add node type to node information
2 parents 57de00e + 877c204 commit 4cb2e41

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

Assets/UnityFileExplorer/Runtime/Scripts/ExplorerExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public static NodeInformation GetNodeInformation(this DriveInfo driveInfo)
88
{
99
return new()
1010
{
11+
Type = ENodeType.Drive,
1112
Name = driveInfo.Name
1213
};
1314
}
@@ -16,6 +17,7 @@ public static NodeInformation GetNodeInformation(this DirectoryInfo directoryInf
1617
{
1718
return new()
1819
{
20+
Type = ENodeType.Folder,
1921
Name = directoryInfo.Name,
2022
Path = directoryInfo.Parent?.FullName,
2123
CreatedAt = directoryInfo.CreationTime,
@@ -27,6 +29,7 @@ public static NodeInformation GetNodeInformation(this FileInfo fileInfo)
2729
{
2830
return new()
2931
{
32+
Type = ENodeType.File,
3033
Name = fileInfo.Name,
3134
Path = fileInfo.DirectoryName,
3235
CreatedAt = fileInfo.CreationTime,

Assets/UnityFileExplorer/Runtime/Scripts/NodeInformation.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ namespace CENTIS.UnityFileExplorer
44
{
55
public class NodeInformation
66
{
7+
public ENodeType Type;
78
public string Name;
89
public string Path;
910
public DateTime CreatedAt;
1011
public DateTime UpdatedAt;
1112
public string CreatedBy;
1213
}
14+
15+
public enum ENodeType
16+
{
17+
Drive,
18+
Folder,
19+
File
20+
}
1321
}

Assets/UnityFileExplorer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "de.htw-berlin.centis.unityfileexplorer",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"displayName": "UnityFileExplorer",
55
"description": "",
66
"unity": "2022.3",

ProjectSettings/ProjectSettings.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ PlayerSettings:
135135
vulkanEnableLateAcquireNextImage: 0
136136
vulkanEnableCommandBufferRecycling: 1
137137
loadStoreDebugModeEnabled: 0
138-
bundleVersion: 0.1.0
138+
bundleVersion: 0.1.1
139139
preloadedAssets: []
140140
metroInputSource: 0
141141
wsaTransparentSwapchain: 0

0 commit comments

Comments
 (0)