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.
파일 보기 프로젝트 열기: brlima94/acat-localization

공개 메소드들

메소드 설명
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