Open main menu

User talk:David corrales

Revision as of 21:09, 23 March 2007 by David corrales (talk | contribs) (added proposed operations)

Google Summer of Code: Filesystem API

This page holds additional information concerning my proposal for working to redesign the current Filesystem API.

It should be noted that the diagrams don't list all methods (for example, when a class inherits them) for brevity and clarity. During the project development, the diagrams will become accurate and exact.

Current Filesystem API implementation

 

Filesystem Node Redesign Proposal

 

Common::File Redesign Proposal

 

Possible new operations

This section describes possible new file/path operations to be added to ScummVM. If the method will be similar to an existing one, it'll be noted in parentheses after the description.

The format used is methodName(param1, ..., paramN) -> ret1, ..., retN: description.


split(path) -> head, tail: split the pathname path into a pair, (head, tail) where tail is the last pathname component and head is everything leading up to that. (python os.path)

splitDrive(path) -> drive, tail: split the pathname path into a pair (drive, tail) where drive is either a drive specification or the empty string. (python os.path)

getSeparator() -> string: returns the separator used in the current backend. For example, "/" for Unix or "\" for Windows.

isAbsolute(path) -> bool: return True if path is an absolute pathname (begins with a slash). (python os.path)

isReadable(path) -> bool: true if the file can be read.

isWriteable(path) -> bool: true if the file can be written.

count(dir) -> int: returns the total number of directories and files in the directory. (Qt)

listDir(list, mode, filter) -> list: lists the dir, with the given mode and filter. This function is already present. The idea is to augment it with filters

isHidden(path) -> bool: tests whether the file pathname is a hidden file. (Java)

getCanonicalPath(path) -> path: returns the canonical pathname string of the abstract pathname. (Java)

Return to the user page of "David corrales".