Open main menu

Difference between revisions of "User talk:David corrales"

added proposed operations
m
(added proposed operations)
Line 13: Line 13:
== Common::File Redesign Proposal ==
== Common::File Redesign Proposal ==
[[Image:Fs3.png]]
[[Image:Fs3.png]]
== 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)