FileTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Input and Output : File Manipulation : FileTools : FileTools/Filename

FileTools

  

Filename

  

get file name from filepath

  

ParentDirectory

  

get parent directory from filepath

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Filename(path)

ParentDirectory(path)

Parameters

path

-

string; filepath, relative or absolute

Description

• 

The Filename and ParentDirectory commands return the file name and the parent directory, respectively, of the file referenced by the filepath path.

• 

The filepath path must be syntactically correct, but is not required to correspond to an existing file or directory.

• 

The behavior of this command may dependent on the platform on which it is executed and the character used to delimit directories on the current platform.

Examples

FileTools[Filename]/etc/passwd

passwd

(1)

FileTools[ParentDirectory]/etc/passwd

/etc

(2)

The following path does not correspond to an existing file.

FileTools[Filename]/friends/romans/countrymen

countrymen

(3)

FileTools[ParentDirectory]/friends/romans/countrymen

/friends/romans

(4)

See Also

FileTools

FileTools[AbsolutePath]

FileTools[Basename]

FileTools[Extension]

FileTools[JoinPath]

FileTools[SplitPath]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam