eric7.RemoteServer.EricServerFileSystemRequestHandler

Module implementing the file system request handler of the eric-ide server.

Global Attributes

None

Classes

EricServerFileSystemRequestHandler Class implementing the file system request handler of the eric-ide server.

Functions

None


EricServerFileSystemRequestHandler

Class implementing the file system request handler of the eric-ide server.

Derived from

EricServerBaseRequestHandler

Class Attributes

None

Class Methods

None

Methods

EricServerFileSystemRequestHandler Constructor
__access Private method to test, if the eric-ide server has the given access rights to a file or directory..
__chdir Private method to change the current working directory.
__dirEntries Private method to get a list of all files and directories of a given directory.
__exists Private method to check if a file or directory of the given name exists.
__expanduser Private method to replace an initial component of ~ or ~user replaced.
__getPathSeparator Private method to report the path separator.
__getcwd Private method to report the current working directory.
__listdir Private method to report a directory listing.
__makedirs Private method to create a new directory.
__mkdir Private method to create a new directory.
__readFile Private method to read the contents of a file.
__remove Private method to delete a file.
__replace Private method to replace (rename) a file or directory.
__rmdir Private method to delete a directory.
__scanDirectory Private method to scan a given directory.
__shutilCopy Private method to copy a source file to a destination file or directory.
__shutilRmtree Private method to delete an entire directory tree.
__stat Private method to get the status of a file.
__writeFile Private method to write data into a file.
sendError Public method to send an error report to the IDE.

Static Methods

None

EricServerFileSystemRequestHandler (Constructor)

EricServerFileSystemRequestHandler(server)

Constructor

server (EricServer)
reference to the eric-ide server object

EricServerFileSystemRequestHandler.__access

__access(params)

Private method to test, if the eric-ide server has the given access rights to a file or directory..

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__chdir

__chdir(params)

Private method to change the current working directory.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__dirEntries

__dirEntries(params)

Private method to get a list of all files and directories of a given directory.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__exists

__exists(params)

Private method to check if a file or directory of the given name exists.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__expanduser

__expanduser(params)

Private method to replace an initial component of ~ or ~user replaced.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__getPathSeparator

__getPathSeparator(params)

Private method to report the path separator.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__getcwd

__getcwd(params)

Private method to report the current working directory.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__listdir

__listdir(params)

Private method to report a directory listing.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__makedirs

__makedirs(params)

Private method to create a new directory.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__mkdir

__mkdir(params)

Private method to create a new directory.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__readFile

__readFile(params)

Private method to read the contents of a file.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__remove

__remove(params)

Private method to delete a file.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__replace

__replace(params)

Private method to replace (rename) a file or directory.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__rmdir

__rmdir(params)

Private method to delete a directory.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__scanDirectory

__scanDirectory(directory, recursive, withHidden=False)

Private method to scan a given directory.

directory (str)
path of the directory to be scanned
recursive (bool)
flag indicating a recursive scan
withHidden (bool (optional))
flag indicating to list hidden files and directories as well (defaults to False)
Return:
list of file and directory entries
Return Type:
list of dict

EricServerFileSystemRequestHandler.__shutilCopy

__shutilCopy(params)

Private method to copy a source file to a destination file or directory.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__shutilRmtree

__shutilRmtree(params)

Private method to delete an entire directory tree.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__stat

__stat(params)

Private method to get the status of a file.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.__writeFile

__writeFile(params)

Private method to write data into a file.

params (dict)
dictionary containing the request data
Return:
dictionary containing the reply data
Return Type:
dict

EricServerFileSystemRequestHandler.sendError

sendError(request, reqestUuid="")

Public method to send an error report to the IDE.

request (str)
request name
reqestUuid (str)
UUID of the associated request as sent by the eric IDE (defaults to "", i.e. no UUID received)
Up