aspnetcore-js-devexpress-dot-richedit-ed0e617d.md
Declares settings that contain information about a file path.
export interface IFilePathInfo
var filePathInfo = DevExpress.RichEdit.Utils.parseFilePath('C:/Users/Public/Documents/Example.docx');
See Also
Returns the path to the directory that contains the file.
readonly directoryPath: string
| Type | Description |
|---|---|
| string |
The path to the directory.
|
var filePath = 'C:/Users/Public/Documents/Example.docx';
//returns 'C:/Users/Public/Documents';
var docDirectoryPath = DevExpress.RichEdit.Utils.parseFilePath(filePath).directoryPath;
Returns the file’s document format.
readonly documentFormat: DocumentFormat | null
| Type | Description |
|---|---|
| DocumentFormat |
The document format. null if the file does not match any document format.
|
var filePath = 'C:/Users/Public/Documents/Example.docx';
//returns 'DevExpress.RichEdit.DocumentFormat.OpenXml';
var docFormat = DevExpress.RichEdit.Utils.parseFilePath(filePath).documentFormat;
Returns the file extension.
readonly extension: string
| Type | Description |
|---|---|
| string |
The file extension.
|
var filePath = 'C:/Users/Public/Documents/Example.docx';
//returns '.docx';
var docExtension = DevExpress.RichEdit.Utils.parseFilePath(filePath).extension;
Returns the file name with the extension.
readonly name: string
| Type | Description |
|---|---|
| string |
The file name with the extension.
|
var filePath = 'C:/Users/Public/Documents/Example.docx';
//returns 'Example.docx';
var docName = DevExpress.RichEdit.Utils.parseFilePath(filePath).name;
Returns the file name without the extension.
readonly nameWithoutExtension: string
| Type | Description |
|---|---|
| string |
The file name without the extension.
|
var filePath = 'C:/Users/Public/Documents/Example.docx';
//returns 'Example';
var docNameWithoutExtension = DevExpress.RichEdit.Utils.parseFilePath(filePath).nameWithoutExtension;
Returns the full file path.
readonly path: string
| Type | Description |
|---|---|
| string |
The file path.
|
var filePath = 'C:/Users/Public/Documents/Example.docx';
//returns 'C:/Users/Public/Documents/Example.docx';
var docPath = DevExpress.RichEdit.Utils.parseFilePath(filePath).path;