-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from David032/12-refactor-file-structure---gen…
…erated-f 12 Refactor file structure - Generated files
- Loading branch information
Showing
4 changed files
with
50 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -366,3 +366,5 @@ ServoSkullDemo/Builds | |
skullOS/skullOs/ | ||
|
||
skullOS/skullOSselfContained/ | ||
|
||
skullOS/builds/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
namespace skullOS.Core | ||
{ | ||
public static class FileManager | ||
{ | ||
private static string rootDirectoryPath = string.Empty; | ||
|
||
public static void CreateSkullDirectory() | ||
{ | ||
DirectoryInfo rootDirectory = null; | ||
string pathToPersonalDir = @Environment.GetFolderPath(Environment.SpecialFolder.Personal); | ||
try | ||
{ | ||
rootDirectory = Directory.CreateDirectory(@pathToPersonalDir + @"/skullOS", unixCreateMode: UnixFileMode.UserRead | UnixFileMode.UserWrite | UnixFileMode.UserExecute); | ||
Check warning on line 13 in skullOS.Core/FileManager.cs GitHub Actions / build (ubuntu-latest)
|
||
} | ||
catch (Exception e) | ||
{ | ||
Console.WriteLine(e.Message); | ||
} | ||
rootDirectoryPath = rootDirectory.FullName; | ||
} | ||
|
||
public static string GetSkullDirectory() | ||
{ | ||
return rootDirectoryPath; | ||
} | ||
|
||
public static void CreateSubDirectory(string directoryName) | ||
{ | ||
if (rootDirectoryPath != string.Empty) | ||
{ | ||
Directory.CreateDirectory(@rootDirectoryPath + "/" + directoryName); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters