C# Класс ACAT.Lib.Core.Utility.FileUtils

Contains functions to contruct paths relative to the various root folders in ACAT such as the Assets folder, the User folder, the Profile folder, the Extensions folder etc.
Показать файл Открыть проект

Открытые методы

Метод Описание
AssemblyResolve ( Assembly executingAssembly, ResolveEventArgs args ) : Assembly
CheckAppExistingInstance ( String mutexName ) : bool

Checks if the app is already running. The mutex is used to check this

ConvertMappedFileNameToDosFileName ( String mappedFileName ) : String

Converts a filename from the \\Device\\HarddiskVolume1\\....\\abc.exe format to a Dos file name

Copy ( String source, String target ) : bool

Copies the spcified source to target. IF source is a folder, recursively copies source to target

CopyDir ( string srcDir, string targetDir, bool recursive ) : bool

Copies the specified source dir to the target dir

Dispose ( ) : void

Not used

GetAssetsDir ( ) : String

Returns fully qualified path to ACAT assets

GetConfigFileFullPath ( String xmlFileName ) : String

Returns the fully qualified name of the XML config file.

GetDependentAssemblyVersion ( Assembly assembly ) : void

Gets version of assembly and referenced assemblies

GetExtensionDir ( ) : String

Returns fully qualified path to the Extensions root folder

GetExtensionDir ( String dir ) : String

Returns fully qualified path of the specified dir relative to to the Extensions root folder

GetFileAssociationForExtension ( string extension ) : string

Returns the path to the executable that is associated with the file extension

GetFontsDir ( ) : String

Returns the fully qualified path to the global ACAT fonts folder

GetImagePath ( string imageFile ) : String

Returns the fully qualified path to the specified image file. First checks the User's image folder. If it doesn't find the file there, returns the path to the global ACAT images folder

GetImagesDir ( ) : String

Returns fully qualified path to the global ACAT Images folder

GetLocalizedFilePath ( String preferredFilePath ) : String

Returns the path to an localized version of the file, if it exists, using the pattern "[filename].[culture_name].[extension]".

GetLogsDir ( ) : String

Returns path to where ACAT log files will be stored

GetMappedFileName ( IntPtr hModule ) : String

Returns the mapped file name of a memory mapped file

GetPreferencesFileFullPath ( String prefName ) : String

Returns the fully qualified name of the preferences file. The location of the file is the same as the EXE

GetSkinsDir ( ) : String

Returns the global ACAT themes folder

GetSkinsImagePath ( string skin, string imageFile ) : String

For the specified imaagefile, gets the fully qualified path to it for the spcified skin

GetSoundPath ( string soundFile ) : String

Returns the fully qualified path to the specified sound file. First checks the User's sounds folder. If it doesn't find the file there, returns the path to the global ACAT sounds folder

GetSoundsDir ( ) : String

Returns the global ACAT sounds folder

GetUserFontsDir ( ) : String

Returns fully qualified path to the Fonts folder relative to the current user's User folder

GetUserImageDir ( ) : String

Returns fully qualified path to the Images folder relative to the current user's User folder

GetUserSkinsDir ( ) : String

Returns path to the themes folder relative to the current user's USER folder

GetUserSoundsDir ( ) : String

Returns the sounds folder relative to the current user's USER folder

GetUsersDir ( ) : String

Returns fully qualified path to the Users folders

IsACATRunning ( ) : bool

Returns true if an instance of any of the ACAT apps is still running

Приватные методы

Метод Описание
AssocQueryString ( uint flags, uint str, string pszAssoc, string pszExtra, [ pszOut, [ pcchOut ) : uint
IsRunning ( String processName ) : bool
Run ( String executable ) : bool
closeAppMutex ( ) : void

Closes the application mutex

copyDir ( string srcDir, string targetDir, bool recursive ) : void

Recursively copies source dir to target

Описание методов

AssemblyResolve() публичный статический Метод

public static AssemblyResolve ( Assembly executingAssembly, ResolveEventArgs args ) : Assembly
executingAssembly System.Reflection.Assembly
args System.ResolveEventArgs
Результат System.Reflection.Assembly

CheckAppExistingInstance() публичный статический Метод

Checks if the app is already running. The mutex is used to check this
public static CheckAppExistingInstance ( String mutexName ) : bool
mutexName String name of the mutex
Результат bool

ConvertMappedFileNameToDosFileName() публичный статический Метод

Converts a filename from the \\Device\\HarddiskVolume1\\....\\abc.exe format to a Dos file name
public static ConvertMappedFileNameToDosFileName ( String mappedFileName ) : String
mappedFileName String input mapped file name
Результат String

Copy() публичный статический Метод

Copies the spcified source to target. IF source is a folder, recursively copies source to target
public static Copy ( String source, String target ) : bool
source String source file or dir
target String target
Результат bool

CopyDir() публичный статический Метод

Copies the specified source dir to the target dir
public static CopyDir ( string srcDir, string targetDir, bool recursive ) : bool
srcDir string source dir
targetDir string target dir>
recursive bool go deep recursively?
Результат bool

Dispose() публичный статический Метод

Not used
public static Dispose ( ) : void
Результат void

GetAssetsDir() публичный статический Метод

Returns fully qualified path to ACAT assets
public static GetAssetsDir ( ) : String
Результат String

GetConfigFileFullPath() публичный статический Метод

Returns the fully qualified name of the XML config file.
public static GetConfigFileFullPath ( String xmlFileName ) : String
xmlFileName String xml config file name
Результат String

GetDependentAssemblyVersion() публичный статический Метод

Gets version of assembly and referenced assemblies
public static GetDependentAssemblyVersion ( Assembly assembly ) : void
assembly System.Reflection.Assembly input assembly
Результат void

GetExtensionDir() публичный статический Метод

Returns fully qualified path to the Extensions root folder
public static GetExtensionDir ( ) : String
Результат String

GetExtensionDir() публичный статический Метод

Returns fully qualified path of the specified dir relative to to the Extensions root folder
public static GetExtensionDir ( String dir ) : String
dir String relative path to the extensions folder
Результат String

GetFileAssociationForExtension() публичный статический Метод

Returns the path to the executable that is associated with the file extension
public static GetFileAssociationForExtension ( string extension ) : string
extension string file extension
Результат string

GetFontsDir() публичный статический Метод

Returns the fully qualified path to the global ACAT fonts folder
public static GetFontsDir ( ) : String
Результат String

GetImagePath() публичный статический Метод

Returns the fully qualified path to the specified image file. First checks the User's image folder. If it doesn't find the file there, returns the path to the global ACAT images folder
public static GetImagePath ( string imageFile ) : String
imageFile string
Результат String

GetImagesDir() публичный статический Метод

Returns fully qualified path to the global ACAT Images folder
public static GetImagesDir ( ) : String
Результат String

GetLocalizedFilePath() публичный статический Метод

Returns the path to an localized version of the file, if it exists, using the pattern "[filename].[culture_name].[extension]".

public static GetLocalizedFilePath ( String preferredFilePath ) : String
preferredFilePath String Path to
Результат String

GetLogsDir() публичный статический Метод

Returns path to where ACAT log files will be stored
public static GetLogsDir ( ) : String
Результат String

GetMappedFileName() публичный статический Метод

Returns the mapped file name of a memory mapped file
public static GetMappedFileName ( IntPtr hModule ) : String
hModule System.IntPtr handle to the module
Результат String

GetPreferencesFileFullPath() публичный статический Метод

Returns the fully qualified name of the preferences file. The location of the file is the same as the EXE
public static GetPreferencesFileFullPath ( String prefName ) : String
prefName String
Результат String

GetSkinsDir() публичный статический Метод

Returns the global ACAT themes folder
public static GetSkinsDir ( ) : String
Результат String

GetSkinsImagePath() публичный статический Метод

For the specified imaagefile, gets the fully qualified path to it for the spcified skin
public static GetSkinsImagePath ( string skin, string imageFile ) : String
skin string skin name
imageFile string image file name
Результат String

GetSoundPath() публичный статический Метод

Returns the fully qualified path to the specified sound file. First checks the User's sounds folder. If it doesn't find the file there, returns the path to the global ACAT sounds folder
public static GetSoundPath ( string soundFile ) : String
soundFile string input sound file name
Результат String

GetSoundsDir() публичный статический Метод

Returns the global ACAT sounds folder
public static GetSoundsDir ( ) : String
Результат String

GetUserFontsDir() публичный статический Метод

Returns fully qualified path to the Fonts folder relative to the current user's User folder
public static GetUserFontsDir ( ) : String
Результат String

GetUserImageDir() публичный статический Метод

Returns fully qualified path to the Images folder relative to the current user's User folder
public static GetUserImageDir ( ) : String
Результат String

GetUserSkinsDir() публичный статический Метод

Returns path to the themes folder relative to the current user's USER folder
public static GetUserSkinsDir ( ) : String
Результат String

GetUserSoundsDir() публичный статический Метод

Returns the sounds folder relative to the current user's USER folder
public static GetUserSoundsDir ( ) : String
Результат String

GetUsersDir() публичный статический Метод

Returns fully qualified path to the Users folders
public static GetUsersDir ( ) : String
Результат String

IsACATRunning() публичный статический Метод

Returns true if an instance of any of the ACAT apps is still running
public static IsACATRunning ( ) : bool
Результат bool