IFilePathInfo Interface
Declares settings that contain information about a file path.
#Declaration
export interface IFilePathInfo
#Remarks
var filePathInfo = DevExpress.RichEdit.Utils.parseFilePath('C:/Users/Public/Documents/Example.docx');
#Properties
#directoryPath Property
Returns the path to the directory that contains the file.
#Declaration
readonly directoryPath: string
#Property Value
Type | Description |
---|---|
string | The path to the directory. |
#Remarks
var filePath = 'C:/Users/Public/Documents/Example.docx';
//returns 'C:/Users/Public/Documents';
var docDirectoryPath = DevExpress.RichEdit.Utils.parseFilePath(filePath).directoryPath;
#documentFormat Property
Returns the file’s document format.
#Declaration
readonly documentFormat: DocumentFormat | null
#Property Value
Type | Description |
---|---|
Document |
The document format. |
#Remarks
var filePath = 'C:/Users/Public/Documents/Example.docx';
//returns 'DevExpress.RichEdit.DocumentFormat.OpenXml';
var docFormat = DevExpress.RichEdit.Utils.parseFilePath(filePath).documentFormat;
#extension Property
Returns the file extension.
#Declaration
readonly extension: string
#Property Value
Type | Description |
---|---|
string | The file extension. |
#Remarks
var filePath = 'C:/Users/Public/Documents/Example.docx';
//returns '.docx';
var docExtension = DevExpress.RichEdit.Utils.parseFilePath(filePath).extension;
#name Property
Returns the file name with the extension.
#Declaration
readonly name: string
#Property Value
Type | Description |
---|---|
string | The file name with the extension. |
#Remarks
var filePath = 'C:/Users/Public/Documents/Example.docx';
//returns 'Example.docx';
var docName = DevExpress.RichEdit.Utils.parseFilePath(filePath).name;
#nameWithoutExtension Property
Returns the file name without the extension.
#Declaration
readonly nameWithoutExtension: string
#Property Value
Type | Description |
---|---|
string | The file name without the extension. |
#Remarks
var filePath = 'C:/Users/Public/Documents/Example.docx';
//returns 'Example';
var docNameWithoutExtension = DevExpress.RichEdit.Utils.parseFilePath(filePath).nameWithoutExtension;
#path Property
Returns the full file path.
#Declaration
readonly path: string
#Property Value
Type | Description |
---|---|
string | The file path. |
#Remarks
var filePath = 'C:/Users/Public/Documents/Example.docx';
//returns 'C:/Users/Public/Documents/Example.docx';
var docPath = DevExpress.RichEdit.Utils.parseFilePath(filePath).path;