FilePath (object)

FilePath FilePath FilePath RTValFromJSONDecoder RTValFromJSONDecoder FilePath->RTValFromJSONDecoder RTValToJSONEncoder RTValToJSONEncoder FilePath->RTValToJSONEncoder

Methods

  FilePath ( in FilePath other )
  FilePath ( in String value )
  FilePath ()
FilePath append ! ( in FilePath a )
  appendDesc ? ( io String string )
  clear ! ()
FilePath clone ? ()
  cloneMembersTo ? ( io FilePath that )
Boolean exists ? ()
FilePath expandEnvVars ? ()
String extension ? ()
FilePath fileName ? ()
FilePath[] getSubPaths ? ()
Boolean hasExtension ? ()
Boolean hasFileName ? ()
Boolean hasParentPath ? ()
Boolean hasRelativePath ? ()
Boolean hasRootDirectory ? ()
Boolean hasRootName ? ()
Boolean hasStem ? ()
Boolean isAbsolute ? ()
Boolean isDirectory ? ()
Boolean isEmpty ? ()
Boolean isRegularFile ? ()
Boolean isRelative ? ()
Boolean isSymlink ? ()
FileTime last_write_time ? ()
FilePath makePreferred ! ()
FilePath parentPath ? ()
FilePath relativePath ? ()
FilePath removeFileName ! ()
FilePath replaceExtension ! ( in String newExtension )
FilePath rootDirectory ? ()
FilePath rootName ? ()
FilePath rootPath ? ()
String stem ? ()
String string ? ()
  ~FilePath ()

Methods in detail

FilePath ( in FilePath other )

copy constructor


FilePath ( in String value )

standard constructor from string


FilePath ()

standard constructor


FilePath FilePath.append! ( in FilePath a )

appends a new segment to this path and returns this


FilePath.appendDesc? ( io String string )


FilePath.clear! ()

clears the content of this path


FilePath FilePath.clone? ()

clone method


FilePath.cloneMembersTo? ( io FilePath that )


Boolean FilePath.exists? ()

returns true if this path exists


FilePath FilePath.expandEnvVars? ()

バージョン 1.13.0 で追加.

expands all contained env vars in the FilePath. Env vars have to be specified as ${VARIABLE}

/*
** Example: expandEnvVars
*/

require FileIO;
  
operator entry() {

  FilePath original = FilePath('${TEMP}') / "MyFile.txt";
  FilePath expanded = original.expandEnvVars();
  report(original.string());
  report(expanded.string());
  
}

/*
** Output:

${TEMP}\MyFile.txt
R:\Temp\MyFile.txt

*/


String FilePath.extension? ()

returns the extension of this path


FilePath FilePath.fileName? ()

returns the filename of this path


FilePath[] FilePath.getSubPaths? ()

returns all child paths


Boolean FilePath.hasExtension? ()

returns true of this path has a extension


Boolean FilePath.hasFileName? ()

returns true of this path has a filename


Boolean FilePath.hasParentPath? ()

returns true of this path has a parent path


Boolean FilePath.hasRelativePath? ()

returns true of this path has a relative path


Boolean FilePath.hasRootDirectory? ()

returns true of this path has a root directory


Boolean FilePath.hasRootName? ()

returns true of this path has a root name


Boolean FilePath.hasStem? ()

returns true of this path has a stem


Boolean FilePath.isAbsolute? ()

returns true of this path has a filename


Boolean FilePath.isDirectory? ()

returns true of this path is a directory on disk


Boolean FilePath.isEmpty? ()

returns true if this path is empty


Boolean FilePath.isRegularFile? ()

returns true of this path is a file on disk


Boolean FilePath.isRelative? ()

returns true of this path has a filename


Boolean FilePath.isSymlink? ()

returns true of this path is a file on disk


FileTime FilePath.last_write_time? ()

バージョン 1.15.0 で追加.

returns the FileTime when the file was last written to. The segmented time elements, such as year, month etc are using the localtime, not the gmtime.


FilePath FilePath.makePreferred! ()

makes this a preferred path ISO/IEC 9945: no effect. Windows: convert slashes to backslashes


FilePath FilePath.parentPath? ()

returns the parent path of this path


FilePath FilePath.relativePath? ()

returns the relative path of this path


FilePath FilePath.removeFileName! ()

removes the filename from this path


FilePath FilePath.replaceExtension! ( in String newExtension )

replaces the extension of the file with a new one


FilePath FilePath.rootDirectory? ()

returns the directory of this path


FilePath FilePath.rootName? ()

returns the root name of this path


FilePath FilePath.rootPath? ()

returns the root path of this path


String FilePath.stem? ()

returns the stem of this path


String FilePath.string? ()

returns this path as a string


~ FilePath ()

standard destructor