| |
Main Page Namespace List Class Hierarchy Alphabetical List Compound List Namespace Members Compound Members
PLMFileProvider Class ReferenceFile provider (virtual class).
More...
#include <PLMFileProvider.hpp>
Inheritance diagram for PLMFileProvider:
[legend]List of all members.
Detailed Description
File provider (virtual class).
Member Function Documentation
| virtual bool PLMFileProvider::Open |
( |
const char * |
source |
) |
[pure virtual] |
|
| virtual const char* PLMFileProvider::Name |
( |
|
) |
[pure virtual] |
|
| virtual u32 PLMFileProvider::NbFiles |
( |
|
) |
[pure virtual] |
|
|
|
Get the total number of entries (files and directories).
Implemented in PLMArchive, and PLMDir. |
| virtual void PLMFileProvider::Update |
( |
|
) |
[inline, virtual] |
|
|
|
Force the source to update its content list.
Items are automatically sorted if Sort() has already been called.
Reimplemented in PLMDir. |
| virtual PLMResFile* PLMFileProvider::OpenFile |
( |
const char * |
name |
) |
const [pure virtual] |
|
|
|
Try to open the file (in read-only mode) named name (may contain a relative path).
- Returns:
-
a valid file pointer (that must be deleted after use) on success, or NULL on error.
Implemented in PLMArchive, and PLMDir. |
| virtual PLMResFile* PLMFileProvider::OpenFile |
( |
const iterator & |
it |
) |
const [pure virtual] |
|
|
|
Try to open the file (in read-only mode) pointed by the iterator it.
- Returns:
-
a valid file pointer (that must be deleted after use) on success, or NULL on error.
|
| iterator PLMFileProvider::Begin |
( |
|
) |
const [inline] |
|
|
|
Get an interator pointing on the first element of the current list.
|
| iterator PLMFileProvider::End |
( |
|
) |
const [inline] |
|
|
|
Get an interator pointing just after the last element of the current list.
Usually to be compared with another iterator to find the end. Call iterator.Last() to get an iterator on the last element. |
| siterator PLMFileProvider::SBegin |
( |
|
) |
const [inline] |
|
|
|
Get a 'sorted' iterator pointing on the first item of the sorted list.
The sorted iterator will run through the list in the order set by the last call to Sort(). |
| siterator PLMFileProvider::SEnd |
( |
|
) |
const [inline] |
|
|
|
Get a 'sorted' iterator pointing just after the last item of the sorted list.
Usually to be compared with another iterator to find the end. Call siterator.Last() to get an iterator on the last element. |
| virtual void PLMFileProvider::Sort |
( |
int |
how |
) |
[virtual] |
|
|
|
Change the order of the list.
Use PLM::SortFlags constants to select an order. Only one of SORT_NAME/SIZE/DATE/EXT can be selected and OR-ed with the other flags REVERSE, CASE and/or DIRS. Later calls to Open() and Update() will automatically use the same settings. Note that only SortedIterators will parse the list in the right order, standard iterators always use the native order (SORT_NONE). After a call to Sort(), any existing s(orted)iterator are not valid anymore, you should get a new one. |
| virtual bool PLMFileProvider::CopyFile |
( |
const char * |
name, |
|
|
const char * |
path |
|
) |
const [pure virtual] |
|
|
|
Copy the file named name from the source, into a standard file.
- Parameters:
-
| name |
the name of the file in the source |
| path |
the directory to create the copied file. It can contain a file name too, in this case, the file uses that name. |
- Returns:
-
true on success.
Implemented in PLMArchive, and PLMDir. |
| virtual void PLMFileProvider::PrintInfo |
( |
|
) |
[pure virtual] |
|
| virtual const char* PLMFileProvider::FileName |
( |
u32 |
i |
) |
const [protected, pure virtual] |
|
|
|
Get the name (read-only) of the file at index i (from an iterator).
Implemented in PLMArchive, and PLMDir. |
| virtual u32 PLMFileProvider::FileSize |
( |
u32 |
i |
) |
const [protected, pure virtual] |
|
|
|
Get the total size in bytes of the file at index i (from an iterator).
Implemented in PLMArchive, and PLMDir. |
| virtual time_t PLMFileProvider::FileDate |
( |
u32 |
i |
) |
const [protected, pure virtual] |
|
|
|
Get the date of the file at index i (from an iterator).
Implemented in PLMArchive, and PLMDir. |
| virtual bool PLMFileProvider::FileAccess |
( |
u32 |
i, |
|
|
u32 |
perm_flags |
|
) |
const [protected, pure virtual] |
|
|
|
Get the access mode of the file at index i (from an iterator).
Implemented in PLMArchive, and PLMDir. |
| virtual bool PLMFileProvider::IsFileHidden |
( |
u32 |
i |
) |
const [protected, pure virtual] |
|
|
|
Check if the file at index i (from an iterator) is hidden.
Implemented in PLMArchive, and PLMDir. |
| virtual bool PLMFileProvider::IsFile |
( |
u32 |
i |
) |
const [protected, pure virtual] |
|
|
|
Check if the element at index i (from an iterator) is a standard file (not a link or a folder).
Implemented in PLMArchive, and PLMDir. |
| virtual bool PLMFileProvider::IsFileLink |
( |
u32 |
i |
) |
const [protected, pure virtual] |
|
|
|
Check if the element at index i (from an iterator) is a link (false under win32).
Implemented in PLMArchive, and PLMDir. |
| virtual bool PLMFileProvider::IsFileDir |
( |
u32 |
i |
) |
const [protected, pure virtual] |
|
|
|
Check if the element at index i (from an iterator) is a directory.
Implemented in PLMArchive, and PLMDir. |
| u32 PLMFileProvider::SortedIndex |
( |
u32 |
i |
) |
const [inline, protected] |
|
|
|
Get the "real" internal index of the i-th sorted element (from an iterator).
|
| u32 PLMFileProvider::IterIndex |
( |
const iterator & |
it |
) |
const [inline, protected] |
|
|
|
Get the internal index of the iterator.
|
|
|
Determine order between two items.
- Returns:
-
- if f1 = f2, return 0
- if f1 < f2, a negative value
- if f1 > f2, a positive value
Implemented in PLMArchive, and PLMDir. |
| virtual PLMSortableItem* PLMFileProvider::GetItem |
( |
u32 |
i |
) |
const [protected, pure virtual] |
|
|
|
Get the real internalindex of the i-th sorted element.
Implemented in PLMArchive, and PLMDir. |
The documentation for this class was generated from the following file:
Generated by
Doxygen 1.2.18 on Tue Oct 26 12:07:44 2004.
|