Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
File Class Reference

#include <elm/sys/File.h>

+ Inheritance diagram for File:

Public Member Functions

int size (void)
 
LockPtr< FiletoFile (void) override
 
- Public Member Functions inherited from FileItem
virtual LockPtr< DirectorytoDirectory ()
 
String name ()
 
Pathpath ()
 
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
 

Additional Inherited Members

- Static Public Member Functions inherited from FileItem
static LockPtr< FileItemget (Path path)
 
- Protected Member Functions inherited from FileItem
 FileItem (Path path, ino_t inode)
 
virtual ~FileItem ()
 
- Protected Attributes inherited from FileItem
Directoryparent
 
Path _path
 
ino_t ino
 

Detailed Description

This class represents a regular file.

Member Function Documentation

◆ size()

int size ( void  )

Get the size of the file.

Returns
File size.

References FileItem::path().

◆ toFile()

LockPtr< File > toFile ( void  )
overridevirtual

Convert the file item to file if it is consistent.

Returns
Matching file or null (if it is a directory for example).

Reimplemented from FileItem.


The documentation for this class was generated from the following files: