![]() |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/sys/FileItem.h>
Inheritance diagram for FileItem:Public Member Functions | |
| virtual LockPtr< File > | toFile () |
| virtual LockPtr< Directory > | toDirectory () |
| String | name () |
| Path & | path () |
| bool | isReadable () |
| bool | isWritable () |
| bool | isDeletable () |
Public Member Functions inherited from Lock | |
| Lock (int usage=0) | |
| void | lock (void) |
| void | unlock (void) |
| int | usage (void) const |
Static Public Member Functions | |
| static LockPtr< FileItem > | get (Path path) |
Protected Member Functions | |
| FileItem (Path path, ino_t inode) | |
| virtual | ~FileItem () |
Protected Attributes | |
| Directory * | parent |
| Path | _path |
| ino_t | ino |
References FileItem::path().
Referenced by FileItem::get().
|
protectedvirtual |
References elm::files, FileItem::ino, and FileItem::path().
Find a file by its name.
| path | Path of the looked file. |
| SystemException | If there is a system error. |
References FileItem::FileItem(), Path::asSysString(), Path::canonical(), elm::files, and FileItem::path().
Referenced by Directory::make().
| bool isDeletable | ( | ) |
Test if the file may be deleted.
References FileItem::_path, Path::asSysString(), and Path::parent().
Test if the file is readble.
References FileItem::_path, and Path::asSysString().
| bool isWritable | ( | ) |
Test if the file is readble.
References FileItem::_path, and Path::asSysString().
Get the name of the file.
References FileItem::_path, and Path::namePart().
Referenced by Set::dump().
Get the path of the file.
References FileItem::_path.
Referenced by FileItem::FileItem(), FileItem::~FileItem(), FileItem::get(), and Directory::make().
Convert the file item to directory if it is consistent.
Reimplemented in Directory.
Convert the file item to file if it is consistent.
Reimplemented in File.
|
protected |
Referenced by FileItem::isDeletable(), FileItem::isReadable(), FileItem::isWritable(), FileItem::name(), and FileItem::path().
|
protected |
Referenced by FileItem::~FileItem().
|
protected |