Click or drag to resize

DiskUtilities Class

Class used to modify items on the computer's harddrive. This class has ONLY been tested in Windows, and only used for editor utilities. Things in here will not likely work in a build on target devices.
Inheritance Hierarchy
SystemObject
  DustProductions.CoreDiskUtilities

Namespace:  DustProductions.Core
Assembly:  DustProductions.Core (in DustProductions.Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public static class DiskUtilities

The DiskUtilities type exposes the following members.

Methods
  NameDescription
Public methodStatic memberGetRootUnityFolderPath
Finds the root folder for where this project is stored.
Public methodStatic memberTryConvertToPossibleAssetPath
Attempts to take a full path and find a folder with the name of the const NameOfAssetsFolder (Currently "Assets/"). Note: this will just look for the first instance of the name, if you nest your actual assets folder inside of another folder with the same name, I have no pity for you.
Public methodStatic memberTryCopyDirectory(DirectoryInfo, DirectoryInfo, Boolean, String)
Attempts to copy all the files in a directory from one place to another.
Public methodStatic memberTryCopyDirectory(String, String, Boolean, String)
Attempts to copy all the files in a directory from one place to another.
Public methodStatic memberTryCopyFile(FileInfo, DirectoryInfo)
Attempts to copy a file into another directory.
Public methodStatic memberTryCopyFile(String, String)
Attempts to copy a file into another directory.
Public methodStatic memberTryDeleteFilesInDirectory(DirectoryInfo, Boolean)
Used to easily clear a directory of its contents.
Public methodStatic memberTryDeleteFilesInDirectory(String, Boolean)
Used to easily clear a directory of its contents.
Public methodStatic memberTryExecuteBatFile
Attempt to run a batch file.
Public methodStatic memberTryGetFilesInDirectory(DirectoryInfo, ListFileInfo, Boolean)
Used to easily get all the files in a directory. This only gets the files, and does not include the folder structure.
Public methodStatic memberTryGetFilesInDirectory(String, ListFileInfo, Boolean)
Used to easily get all the files in a directory. This only gets the files, and does not include the folder structure.
Top
Fields
  NameDescription
Public fieldStatic memberNameOfAssetsFolder
A hacky way to find out where the Assets folder is, this needs to be refactored and replaced by Application.dataPath
Public fieldStatic memberPathFromRootToCSharpAssembly
The relative path from the project folder to where Unity compiles the C# code into an assembly
Top
See Also