Static Public Member Functions | List of all members
FileSystem Class Reference

Inherits ScriptObject.

Static Public Member Functions

static String getCombinedPath (String rootPath, String relativePath)
 
static String getFolderPath (String path)
 
static String getFilename (String path)
 
static String replaceExtension (String path, String extension)
 
static makeFolder (String path)
 
static Boolean isFolder (String path)
 
static Boolean isFile (String path)
 
static copyFile (String src, String dest)
 
static moveFile (String src, String dest)
 
static remove (String path)
 
static removeFolder (String path)
 
static removeFolderRecursive (String path)
 
static Integer getFileSize (String path)
 
static String getTemporaryFolder ()
 
static String getTemporaryFile (String prefix)
 

Detailed Description

This class provides access to the file system.

Security: Requires security level 0.

Member Function Documentation

◆ copyFile()

static copyFile ( String  src,
String  dest 
)
static

Copies the specified file from the source path to the destination path.

Parameters
srcThe path of the source file.
destThe path of the destination file.

◆ getCombinedPath()

static String getCombinedPath ( String  rootPath,
String  relativePath 
)
static

Returns the combined paths.

Parameters
rootPathThe tool path.
relativePathThe relative path.

◆ getFilename()

static String getFilename ( String  path)
static

Returns the filename from specified path.

Parameters
pathThe path.
Since
r16737

◆ getFileSize()

static Integer getFileSize ( String  path)
static

Returns the size of the specified file.

Parameters
pathThe path of the file.

◆ getFolderPath()

static String getFolderPath ( String  path)
static

Returns the path of the parent folder.

Parameters
pathThe path.

◆ getTemporaryFile()

static String getTemporaryFile ( String  prefix)
static

Returns the path of a new temporary file.

Parameters
prefixThe prefix of the file.

◆ getTemporaryFolder()

static String getTemporaryFolder ( )
static

Returns the path of the primary temporary folder.

◆ isFile()

static Boolean isFile ( String  path)
static

Returns true if the specified file exists.

Parameters
pathThe path of the file.

◆ isFolder()

static Boolean isFolder ( String  path)
static

Returns true if the specified folder exists.

Parameters
pathThe path of the folder.

◆ makeFolder()

static makeFolder ( String  path)
static

Creates the specified folder.

Parameters
pathThe path of the folder.

◆ moveFile()

static moveFile ( String  src,
String  dest 
)
static

Moves the specified file from the source path to the destination path.

Parameters
srcThe path of the source file.
destThe path of the destination file.

◆ remove()

static remove ( String  path)
static

Removes the specified file.

◆ removeFolder()

static removeFolder ( String  path)
static

Removes the specified folder.

◆ removeFolderRecursive()

static removeFolderRecursive ( String  path)
static

Removes the specified folder recursively.

◆ replaceExtension()

static String replaceExtension ( String  path,
String  extension 
)
static

Replaces the extension of the specified path.



Generated by Autodesk, Inc. 19 April 2024
Copyright (c) 2012-2024 by Autodesk, Inc.