Language:

The Free and Open Productivity Suite
Apache OpenOffice 4.1.4 released

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous


Methods of Class Directory


Directory
Directory(
Directory & );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO NO NO

Summary
Copy constructor.

operator=
Directory & operator=(
Directory & );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO NO NO

Summary
Assignment operator.

Directory
Directory(
const ::rtl::OUString & strPath );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Constructor.
Parameters
strPath
        The full qualified URL of the directory.
        Relative URLs are not allowed.
     

~Directory
~Directory();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Destructor.

open
RC open();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Open a directory for enumerating its contents.
Return
E_None on success E_INVAL the format of the parameters was not valid E_NOENT the specified path doesn't exist E_NOTDIR the specified path is not an directory 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_NAMETOOLONG File name too long E_LOOP Too many symbolic links encountered
See Also
getNextItem()
close()

isOpen
sal_Bool isOpen();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Query if directory is open.
Description
Query if directory is open and so item enumeration is valid.
Return
sal_True if the directory is open else sal_False.
See Also
open()
close()

close
RC close();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Close a directory.
Return
E_None on success E_INVAL the format of the parameters was not valid E_NOMEM not enough memory for allocating structures E_BADF invalid oslDirectory parameter E_INTR the function call was interrupted
See Also
open()

reset
RC reset();

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Resets the directory item enumeration to the beginning.
Return
E_None on success E_INVAL the format of the parameters was not valid E_NOENT the specified path doesn't exist E_NOTDIR the specified path is not an directory 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_NAMETOOLONG File name too long E_LOOP Too many symbolic links encountered
See Also
open()

getNextItem
RC getNextItem(
DirectoryItem & rItem,
sal_uInt32 nHint = 0 );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO NO YES NO

Summary
Retrieve the next item of a previously opened directory.
Description
Retrieves the next item of a previously opened directory.
Parameters
rItem
        On success a valid DirectoryItem.
        
        
nHint
        With this parameter the caller can tell the implementation that (s)he
        is going to call this function uHint times afterwards. This enables the implementation to
        get the information for more than one file and cache it until the next calls.

        
Return
E_None on success E_INVAL the format of the parameters was not valid E_NOMEM not enough memory for allocating structures E_NOENT no more entries in this directory E_BADF invalid oslDirectory parameter E_OVERFLOW the value too large for defined data type
See Also
DirectoryItem

getVolumeInfo
static RC getVolumeInfo(
const ::rtl::OUString & ustrDirectoryURL,
VolumeInfo & rInfo );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO YES YES NO

Summary
Retrieve information about a volume.
Description
Retrieves information about a volume. A volume can either be a mount point, a network resource or a drive depending on Operating System and File System.
Parameters
ustrDirectoryURL
        Full qualified URL of the volume
        
        
rInfo
        On success it receives information about the volume.
                
        
Return
E_None on success E_NOMEM not enough memory for allocating structures E_INVAL the format of the parameters was not valid E_NOTDIR not a directory E_NAMETOOLONG file name too long E_NOENT no such file or directory E_ACCES permission denied E_LOOP too many symbolic links encountered E_FAULT Bad address E_IO on I/O errors E_NOSYS function not implemented E_MULTIHOP multihop attempted E_NOLINK link has been severed E_INTR function call was interrupted
See Also
FileStatus
VolumeInfo

create
static RC create(
const ::rtl::OUString & ustrDirectoryURL );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO YES YES NO

Summary
Create a directory.
Parameters
ustrDirectoryURL
        Full qualified URL of the directory to create.

        
Return
E_None on success E_INVAL the format of the parameters was not valid E_NOMEM not enough memory for allocating structures E_EXIST file exists E_ACCES permission denied E_NAMETOOLONG file name too long E_NOENT no such file or directory E_NOTDIR not a directory E_ROFS read-only file system E_NOSPC no space left on device E_DQUOT quota exceeded E_LOOP too many symbolic links encountered E_FAULT bad address E_IO on I/O errors E_MLINK too many links E_MULTIHOP multihop attempted E_NOLINK link has been severed
See Also
remove()

remove
static RC remove(
const ::rtl::OUString & ustrDirectoryURL );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO YES YES NO

Summary
Remove an empty directory.
Parameters
ustrDirectoryURL
        Full qualified URL of the directory.
        
        
Return
E_None on success E_INVAL the format of the parameters was not valid E_NOMEM not enough memory for allocating structures E_PERM operation not permitted E_ACCES permission denied E_NOENT no such file or directory E_NOTDIR not a directory E_NOTEMPTY directory not empty E_FAULT bad address E_NAMETOOLONG file name too long E_BUSY device or resource busy E_ROFS read-only file system E_LOOP too many symbolic links encountered E_BUSY device or resource busy E_EXIST file exists E_IO on I/O errors E_MULTIHOP multihop attempted E_NOLINK link has been severed
See Also
create()

createPath
static RC createPath(
const ::rtl::OUString & aDirectoryUrl,
DirectoryCreationObserver * aDirectoryCreationObserver = NULL );

virtual abstract const volatile template static inline C-linkage
NO NO NO NO NO YES YES NO

Summary
Create a directory path.
Description
The osl_createDirectoryPath function creates a specified directory path. All nonexisting sub directories will be created.

PLEASE NOTE: You cannot rely on getting the error code E_EXIST for existing directories. Programming against this error code is in general a strong indication of a wrong usage of osl_createDirectoryPath.

Parameters
aDirectoryUrl
        [in] The absolute file URL of the directory path to create.
        A relative file URL will not be accepted.
                
        
aDirectoryCreationObserver
        [in] Pointer to an instance of type DirectoryCreationObserver that will
        be informed about the creation of a directory. The value of this 
        parameter may be NULL, in this case notifications will not be sent. 
                        
        
Return
E_None
On success
E_INVAL
The format of the parameters was not valid
E_ACCES
Permission denied
E_EXIST
The final node of the specified directory path already exist
E_NAMETOOLONG
The name of the specified directory path exceeds the maximum allowed length
E_NOTDIR
A component of the specified directory path already exist as file in any part of the directory path
E_ROFS
Read-only file system
E_NOSPC
No space left on device
E_DQUOT
Quota exceeded
E_FAULT
Bad address
E_IO
I/O error
E_LOOP
Too many symbolic links encountered
E_NOLINK
Link has been severed
E_invalidError
An unknown error occurred
See Also
DirectoryCreationObserver
create

Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache and the Apache feather logo are trademarks of The Apache Software Foundation. OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.