LibreOffice
LibreOffice 5.3 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Friends | List of all members
osl::FileStatus Class Reference

The FileStatus class. More...

#include <file.hxx>

Public Types

enum  Type {
  Directory = osl_File_Type_Directory, Volume = osl_File_Type_Volume, Regular = osl_File_Type_Regular, Fifo = osl_File_Type_Fifo,
  Socket = osl_File_Type_Socket, Link = osl_File_Type_Link, Special = osl_File_Type_Special, Unknown = osl_File_Type_Unknown
}
 

Public Member Functions

 FileStatus (sal_uInt32 nMask)
 Constructor. More...
 
 ~FileStatus ()
 Destructor. More...
 
bool isValid (sal_uInt32 nMask) const
 Check if specified fields are valid. More...
 
Type getFileType () const
 Get the file type. More...
 
bool isDirectory () const
 Is it a directory? This method returns True for both directories, and volumes. More...
 
bool isRegular () const
 Is it a regular file? More...
 
bool isLink () const
 Is it a link? More...
 
sal_uInt64 getAttributes () const
 Get the file attributes. More...
 
TimeValue getCreationTime () const
 Get the creation time of this file. More...
 
TimeValue getAccessTime () const
 Get the file access time. More...
 
TimeValue getModifyTime () const
 Get the file modification time. More...
 
sal_uInt64 getFileSize () const
 Get the size of the file. More...
 
inline::rtl::OUString getFileName () const
 Get the file name. More...
 
inline::rtl::OUString getFileURL () const
 Get the URL of the file. More...
 
inline::rtl::OUString getLinkTargetURL () const
 Get the link target URL. More...
 

Friends

class DirectoryItem
 

Detailed Description

The FileStatus class.

See Also
DirectoryItem::getFileStatus

Member Enumeration Documentation

Enumerator
Directory 
Volume 
Regular 
Fifo 
Socket 
Link 
Special 
Unknown 

Constructor & Destructor Documentation

osl::FileStatus::FileStatus ( sal_uInt32  nMask)
inline

Constructor.

Parameters
nMaskSet of flags describing the demanded information.
osl::FileStatus::~FileStatus ( )
inline

Destructor.

Member Function Documentation

TimeValue osl::FileStatus::getAccessTime ( ) const
inline

Get the file access time.

Returns
The last access time if this information is valid, an uninitialized TimeValue otherwise.
sal_uInt64 osl::FileStatus::getAttributes ( ) const
inline

Get the file attributes.

Returns
The set of attribute flags of this file.
TimeValue osl::FileStatus::getCreationTime ( ) const
inline

Get the creation time of this file.

Returns
The creation time if this information is valid, an uninitialized TimeValue otherwise.
inline ::rtl::OUString osl::FileStatus::getFileName ( ) const
inline

Get the file name.

Returns
The file name if this information is valid, an empty string otherwise.
sal_uInt64 osl::FileStatus::getFileSize ( ) const
inline

Get the size of the file.

Returns
The actual file size if this information is valid, 0 otherwise.
Type osl::FileStatus::getFileType ( ) const
inline

Get the file type.

Returns
The file type.
inline ::rtl::OUString osl::FileStatus::getFileURL ( ) const
inline

Get the URL of the file.

Returns
The full qualified URL of the file if this information is valid, an empty string otherwise.
inline ::rtl::OUString osl::FileStatus::getLinkTargetURL ( ) const
inline

Get the link target URL.

Returns
The link target URL if this information is valid, an empty string otherwise.
TimeValue osl::FileStatus::getModifyTime ( ) const
inline

Get the file modification time.

Returns
The last modified time if this information is valid, an uninitialized TimeValue otherwise.
bool osl::FileStatus::isDirectory ( ) const
inline

Is it a directory? This method returns True for both directories, and volumes.

Returns
True if it's a directory, False otherwise.
See Also
getFileType
Since
LibreOffice 3.6
bool osl::FileStatus::isLink ( ) const
inline

Is it a link?

Returns
True if it's a link, False otherwise.
See Also
getFileType
Since
LibreOffice 3.6
bool osl::FileStatus::isRegular ( ) const
inline

Is it a regular file?

Returns
True if it's a regular file, False otherwise.
See Also
getFileType
isFile
isLink
Since
LibreOffice 3.6
bool osl::FileStatus::isValid ( sal_uInt32  nMask) const
inline

Check if specified fields are valid.

Parameters
nMaskSet of flags for the fields to check.
Returns
true if all fields are valid else false.

Friends And Related Function Documentation

friend class DirectoryItem
friend

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