Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
|
FileSystem holds and manipulates the file system on routers and switches. More...
Public Member Functions | |
int | getSize () |
Returns the size of the file system. More... | |
int | getCapacity () |
Returns the capacity of the file system. More... | |
int | getSpaceFree () |
Returns the amount of free space on the file system. More... | |
![]() | |
int | getFileCount () |
Returns the number of files in the file system. More... | |
File | getFileAt (int) |
Returns the file at the specified index. More... | |
File | getFile (string) |
Returns the file with the specified filename. More... | |
bool | fileExist (string) |
Returns if a file exist in the file system. More... | |
int | getSpaceUsed () |
Returns the amount of space used on this file system. More... | |
bool | addFile (File, bool) |
Add file into filesystem. More... | |
bool | addTextFile (string, string, bool) |
Add text file into filesystem. More... | |
bool | addDirectory (string, bool) |
Add directory into filesystem. More... | |
bool | addHttpPage (string, string, bool) |
Returns true if the HTTP page was added successfully, false otherwise. More... | |
bool | copyAllFilesFrom (Directory, bool) |
Copy all files from another directory. More... | |
bool | removeFile (string, bool) |
Returns true if the file was removed successfully, false otherwise. More... | |
bool | removeAllFiles (bool) |
Returns true if all files were removed successfully, false otherwise. More... | |
bool | renameFile (string, string, bool) |
Returns true if the file was renamed successfully, false otherwise. More... | |
void | fileAdded (string) |
This event is emitted when a file is added successfully. More... | |
void | fileRemoved (string) |
This event is emitted when a file is removed successfully. More... | |
void | fileRenamed (string, string) |
This event is emitted when a file name is changed successfully. More... | |
![]() | |
string | getName () |
Returns the filename of the file. More... | |
FilePermission | getPermission () |
Returns the permissions of the file. More... | |
bool | isExecutable () |
Returns true if the file is executable, otherwise false. More... | |
bool | isWritable () |
Returns true if the file is writable, otherwise false. More... | |
bool | isReadable () |
Returns true if the file is readable, otherwise false. More... | |
bool | isDirectory () |
Returns true if the file is a directory, otherwise false. More... | |
int | getSize () |
Returns the filesize of the file. More... | |
Directory | getParent () |
Returns the parent directory. More... | |
string | getAbsPath () |
Returns absolute path of the File object. More... | |
void | setTextContent (string, bool) |
set the content of the File object. More... | |
FileContent | getContent (bool) |
Returns the file content of the File. More... | |
FileSystem holds and manipulates the file system on routers and switches.
int FileSystem::getCapacity | ( | ) |
Returns the capacity of the file system.
int FileSystem::getSize | ( | ) |
Returns the size of the file system.
int FileSystem::getSpaceFree | ( | ) |
Returns the amount of free space on the file system.