FCF 2.0 development in progress...
> > > >
[News] [Packages API] [Downloads] [Donate to the project] [Contacts]

fcf.getDirectory() function

string fcf.getDirectory(string a_path)

Package: fcf-framework-core

File: fcf-framework-core:fcf.js

Available from version: 2.0.2

Returns the path of a directory

Arguments

string a_path
- Source path
Result
string
- Path to parent directory

Example: Function application

{ let result = fcf.getDirectory("/directory/file.txt"); console.warn(result); } { let result = fcf.getDirectory("C:\\directory1\\directory2\\file.txt"); console.warn(result); }

Output:

/directory C:\directory1\directory2