vtk-dicom
0.8.17
|
A class that provides directory listings. More...
#include <vtkDICOMFileDirectory.h>
Public Types | |
enum | Mode { In , Out } |
The access mode (input or output). | |
enum | Code { Good , UnknownError , AccessDenied , Reserved , ImpossiblePath , FileNotFound , OutOfSpace } |
Error codes. | |
Public Member Functions | |
vtkDICOMFileDirectory (const char *dirname) | |
Construct the object from a directory name. More... | |
vtkDICOMFileDirectory (const vtkDICOMFileDirectory &) | |
Copy constructor. | |
~vtkDICOMFileDirectory () | |
Destruct the object. | |
int | GetError () |
Return an error indicator (zero if no error). | |
int | GetNumberOfEntries () |
Get the number of files and subdirectories in the directory. | |
const char * | GetEntry (int i) |
Get the name of the ith file or subdirectory. More... | |
bool | IsDirectory (int i) |
Check if the list entry is a directory. | |
bool | IsSpecial (int i) |
Check if the list entry is special (a device, socket, or pipe). | |
bool | IsSymlink (int i) |
Check if the list entry is a symbolic link. | |
bool | IsBroken (int i) |
Check if the list entry is a symbolic link that is broken. More... | |
bool | IsHidden (int i) |
Check if the list entry has an attribute that marks it as hidden. | |
vtkDICOMFileDirectory & | operator= (const vtkDICOMFileDirectory &) |
Assignment operator. | |
Static Public Member Functions | |
static int | Access (const char *dirname, Mode mode) |
Test a directory for accessibility (static method). More... | |
static int | Create (const char *dirname) |
Create a new directory with default permissions (static method). More... | |
A class that provides directory listings.
vtkDICOMFileDirectory::vtkDICOMFileDirectory | ( | const char * | dirname | ) |
Construct the object from a directory name.
This causes the directory to be read. Use GetError() to check whether the read was successful.
|
static |
Test a directory for accessibility (static method).
The mode should be "In" or "Out" to indicate whether you intend to read from or write to the directory. A return value of zero means the directory can be accessed, otherwise an error code will be returned.
|
static |
Create a new directory with default permissions (static method).
This will create any intermediate directories, as well. The return value is zero for success. Otherwise, one of the error codes is returned.
const char* vtkDICOMFileDirectory::GetEntry | ( | int | i | ) |
Get the name of the ith file or subdirectory.
The entries do not include "." or "..".
bool vtkDICOMFileDirectory::IsBroken | ( | int | i | ) |
Check if the list entry is a symbolic link that is broken.
A link is broken if it points to a location that does not exist, or to a location that is in a directory that cannot be accessed. IsSymlink() will always be true if IsBroken() is true.