Back to Devexpress

IFilePathInfo Interface

aspnetcore-js-devexpress-dot-richedit-ed0e617d.md

latest3.5 KB
Original Source

IFilePathInfo Interface

Declares settings that contain information about a file path.

Declaration

ts
export interface IFilePathInfo

Remarks

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

See Also

parseFilePath(filePath)

Properties

directoryPath Property

Returns the path to the directory that contains the file.

Declaration

ts
readonly directoryPath: string

Property Value

TypeDescription
string

The path to the directory.

|

Remarks

javascript
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

ts
readonly documentFormat: DocumentFormat | null

Property Value

TypeDescription
DocumentFormat

The document format. null if the file does not match any document format.

|

Remarks

javascript
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

ts
readonly extension: string

Property Value

TypeDescription
string

The file extension.

|

Remarks

javascript
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

ts
readonly name: string

Property Value

TypeDescription
string

The file name with the extension.

|

Remarks

javascript
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

ts
readonly nameWithoutExtension: string

Property Value

TypeDescription
string

The file name without the extension.

|

Remarks

javascript
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

ts
readonly path: string

Property Value

TypeDescription
string

The file path.

|

Remarks

javascript
var filePath = 'C:/Users/Public/Documents/Example.docx';
//returns 'C:/Users/Public/Documents/Example.docx';
var docPath = DevExpress.RichEdit.Utils.parseFilePath(filePath).path;