Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IFilePathInfo Interface

Declares settings that contain information about a file path.

#Declaration

TypeScript
export interface IFilePathInfo

#Remarks

var filePathInfo = DevExpress.RichEdit.Utils.parseFilePath('C:/Users/Public/Documents/Example.docx');
See Also

#Properties

#directoryPath Property

Returns the path to the directory that contains the file.

#Declaration

TypeScript
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

TypeScript
readonly documentFormat: DocumentFormat | null

#Property Value

Type Description
DocumentFormat

The document format. null if the file does not match any 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

TypeScript
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

TypeScript
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

TypeScript
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

TypeScript
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;