UDK 3.2.7 C/C++ API Reference
Public Member Functions | Static Public Member Functions | Friends
osl::DirectoryItem Class Reference

The directory item class object provides access to file status information. More...

#include <file.hxx>

Inheritance diagram for osl::DirectoryItem:
osl::FileBase

List of all members.

Public Member Functions

 DirectoryItem ()
 Constructor.
 DirectoryItem (const DirectoryItem &rItem)
 Copy constructor.
 ~DirectoryItem ()
 Destructor.
DirectoryItemoperator= (const DirectoryItem &rItem)
 Assignment operator.
sal_Bool is ()
 Check for validity of this instance.
RC getFileStatus (FileStatus &rStatus)
 Retrieve information about a single file or directory.
sal_Bool isIdenticalTo (const DirectoryItem &pOther)
 Determine if a directory item point the the same underlying file.

Static Public Member Functions

static RC get (const ::rtl::OUString &ustrFileURL, DirectoryItem &rItem)
 Retrieve a single directory item.

Friends

class Directory

Detailed Description

The directory item class object provides access to file status information.

See also:
FileStatus

Constructor & Destructor Documentation

osl::DirectoryItem::DirectoryItem ( ) [inline]

Constructor.

osl::DirectoryItem::DirectoryItem ( const DirectoryItem rItem) [inline]

Copy constructor.

osl::DirectoryItem::~DirectoryItem ( ) [inline]

Destructor.


Member Function Documentation

static RC osl::DirectoryItem::get ( const ::rtl::OUString ustrFileURL,
DirectoryItem rItem 
) [inline, static]

Retrieve a single directory item.

Retrieves a single directory item. The returned handle has an initial refcount of 1. Due to performance issues it is not recommended to use this function while enumerating the contents of a directory. In this case use osl_getNextDirectoryItem() instead.

Parameters:
ustrFileURL[in] An absolute file URL.
rItem[out] On success it receives a handle which can be used for subsequent calls to osl_getFileStatus(). The handle has to be released by a call to osl_releaseDirectoryItem().
Returns:
E_None on success E_INVAL the format of the parameters was not valid E_NOMEM not enough memory for allocating structures E_ACCES permission denied E_MFILE too many open files used by the process E_NFILE too many open files in the system E_NOENT no such file or directory E_LOOP too many symbolic links encountered E_NAMETOOLONG the file name is too long E_NOTDIR a component of the path prefix of path is not a directory E_IO on I/O errors E_MULTIHOP multihop attempted E_NOLINK link has been severed E_FAULT bad address E_INTR the function call was interrupted
See also:
FileStatus
Directory::getNextItem()
RC osl::DirectoryItem::getFileStatus ( FileStatus rStatus) [inline]

Retrieve information about a single file or directory.

Parameters:
rStatus[in|out] Reference to a class which receives the information of the file or directory represented by this directory item.
Returns:
E_None on success E_NOMEM not enough memory for allocating structures E_INVAL the format of the parameters was not valid E_LOOP too many symbolic links encountered E_ACCES permission denied E_NOENT no such file or directory E_NAMETOOLONG file name too long E_BADF invalid oslDirectoryItem parameter E_FAULT bad address E_OVERFLOW value too large for defined data type E_INTR function call was interrupted E_NOLINK link has been severed E_MULTIHOP components of path require hopping to multiple remote machines and the file system does not allow it E_MFILE too many open files used by the process E_NFILE too many open files in the system E_NOSPC no space left on device E_NXIO no such device or address E_IO on I/O errors E_NOSYS function not implemented
See also:
get()
Directory::getNextItem()
FileStatus
sal_Bool osl::DirectoryItem::is ( ) [inline]

Check for validity of this instance.

Returns:
sal_True if object is valid directory item else sal_False.
sal_Bool osl::DirectoryItem::isIdenticalTo ( const DirectoryItem pOther) [inline]

Determine if a directory item point the the same underlying file.

The comparison is done first by URL, and then by resolving links to find the target, and finally by comparing inodes on unix.

Parameters:
[in]pOtherA directory handle to compare with the underlying object's item
Returns:
sal_True: if the items point to an identical resource
sal_False: if the items point to a different resource, or a fatal error occured
See also:
osl_getDirectoryItem()
Since:
LibreOffice 3.6
DirectoryItem& osl::DirectoryItem::operator= ( const DirectoryItem rItem) [inline]

Assignment operator.


Friends And Related Function Documentation

friend class Directory [friend]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines