![]() |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/sys/FileItem.h>
Public Member Functions | |
virtual LockPtr< File > | toFile () |
virtual LockPtr< Directory > | toDirectory () |
String | name () |
Path & | path () |
bool | isReadable () |
bool | isWritable () |
bool | isDeletable () |
![]() | |
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 Path::asSysString(), Path::canonical(), FileItem::FileItem(), 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().
bool isReadable | ( | ) |
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().
String name | ( | ) |
Path & path | ( | ) |
Get the path of the file.
References FileItem::_path.
Referenced by FileItem::FileItem(), FileItem::get(), elm::sys::isLibrary(), Directory::make(), File::size(), and FileItem::~FileItem().
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 |