Smart Localization  2.3
SmartLocalization.Editor.FileUtility Class Reference

Utility class for handling files More...

Static Public Member Functions

static bool Exists (string fullPath)
 Checks if a file exists More...
 
static string GetFileExtension (string fileName, string relativeFolderPath)
 Gets the file extension for the file at the specified path More...
 
static string GetFileExtension (string fullPath)
 Gets a file extension of a file More...
 
static bool ExistsRelative (string relativePath)
 Appends the relativePath to Application.dataPath More...
 
static string RemoveExtension (string fullPath)
 Returns the file name without the extension More...
 
static bool Delete (string fullPath)
 Deletes a file More...
 
static bool WriteToFile (string fullPath, string data)
 Writes string data to a file More...
 
static bool ReadFromFile (string fullPath, out string data)
 Reads string data from a file More...
 

Detailed Description

Utility class for handling files

Member Function Documentation

static bool SmartLocalization.Editor.FileUtility.Delete ( string  fullPath)
static

Deletes a file

Parameters
fullPathThe full path to the file to delete
Returns
If the file was deleted
static bool SmartLocalization.Editor.FileUtility.Exists ( string  fullPath)
static

Checks if a file exists

Parameters
fullPathThe path to the file
Returns
If the file exists
static bool SmartLocalization.Editor.FileUtility.ExistsRelative ( string  relativePath)
static

Appends the relativePath to Application.dataPath

static string SmartLocalization.Editor.FileUtility.GetFileExtension ( string  fileName,
string  relativeFolderPath 
)
static

Gets the file extension for the file at the specified path

Parameters
fileNameThe file name without the extension. If the full name is for example hello.png, this parameter should be only "hello"
relativeFolderPathThe relative path to the folder containing the asset file relativeFolderPath should be relative to the project folder. Like: "Assets/MyTextures/".
static string SmartLocalization.Editor.FileUtility.GetFileExtension ( string  fullPath)
static

Gets a file extension of a file

Parameters
fullPathThe full path to the file
Returns
The file extension of a file
static bool SmartLocalization.Editor.FileUtility.ReadFromFile ( string  fullPath,
out string  data 
)
static

Reads string data from a file

Parameters
fullPathThe full path to the file to read from
dataThe data that was read from the file
Returns
If the operation was a success
static string SmartLocalization.Editor.FileUtility.RemoveExtension ( string  fullPath)
static

Returns the file name without the extension

Parameters
fullPathThe full path to the file
Returns
The file name without the extension
static bool SmartLocalization.Editor.FileUtility.WriteToFile ( string  fullPath,
string  data 
)
static

Writes string data to a file

Parameters
fullPathThe full path to the file to write to
dataThe string data to write
Returns
If the writing operation was a success

The documentation for this class was generated from the following file: