aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/abstract-fs.h
diff options
context:
space:
mode:
authorDavid Corrales2007-08-18 05:24:18 +0000
committerDavid Corrales2007-08-18 05:24:18 +0000
commit1dc13a641dd82825334e81bb3eb3b4ebd69d2552 (patch)
tree3742d54ef20917ea4afdd88f8448b8479a4c583e /backends/fs/abstract-fs.h
parent6856535010bd2fa4449bcfde1c88dc06cd46e26f (diff)
downloadscummvm-rg350-1dc13a641dd82825334e81bb3eb3b4ebd69d2552.tar.gz
scummvm-rg350-1dc13a641dd82825334e81bb3eb3b4ebd69d2552.tar.bz2
scummvm-rg350-1dc13a641dd82825334e81bb3eb3b4ebd69d2552.zip
Merged some of the changes from the trunk patch back in to the GSoC fsnode branch.
svn-id: r28649
Diffstat (limited to 'backends/fs/abstract-fs.h')
-rw-r--r--backends/fs/abstract-fs.h36
1 files changed, 32 insertions, 4 deletions
diff --git a/backends/fs/abstract-fs.h b/backends/fs/abstract-fs.h
index 85fcbcdebb..e506d96a0b 100644
--- a/backends/fs/abstract-fs.h
+++ b/backends/fs/abstract-fs.h
@@ -79,7 +79,7 @@ public:
virtual ~AbstractFilesystemNode() {}
/*
- * Indicates whether the object refered by this path exists in the filesystem or not.
+ * Indicates whether the object referred by this path exists in the filesystem or not.
*/
virtual bool exists() const = 0;
@@ -103,6 +103,18 @@ public:
virtual String getDisplayName() const { return getName(); }
/**
+ * Returns the last component of a given path.
+ *
+ * Examples:
+ * /foo/bar.txt would return /bar.txt
+ * /foo/bar/ would return /bar/
+ *
+ * @param str String containing the path.
+ * @return Pointer to the first char of the last component inside str.
+ */
+ virtual const char *getLastPathComponent(const Common::String &str) const = 0;
+
+ /**
* Returns a string with an architecture dependent path description.
*/
virtual String getName() const = 0;
@@ -118,12 +130,28 @@ public:
virtual bool isDirectory() const = 0;
/**
- * Indicates whether this path can be read from or not.
+ * Indicates whether the object referred by this path can be read from or not.
+ *
+ * If the path refers to a directory, readability implies being able to read
+ * and list the directory entries.
+ *
+ * If the path refers to a file, readability implies being able to read the
+ * contents of the file.
+ *
+ * @return bool true if the object can be read, false otherwise.
*/
virtual bool isReadable() const = 0;
/**
- * Indicates whether this path can be written to or not.
+ * Indicates whether the object referred by this path can be written to or not.
+ *
+ * If the path refers to a directory, writability implies being able to modify
+ * the directory entry (i.e. rename the directory, remove it or write files inside of it).
+ *
+ * If the path refers to a file, writability implies being able to write data
+ * to the file.
+ *
+ * @return bool true if the object can be written to, false otherwise.
*/
virtual bool isWritable() const = 0;
@@ -132,4 +160,4 @@ public:
*/
};
-#endif
+#endif //BACKENDS_ABSTRACT_FS_H