[Libreoffice-commits] .: 2 commits - sal/inc
Josh Heidenreich
jheidenreich at kemper.freedesktop.org
Thu Mar 8 14:24:45 PST 2012
sal/inc/osl/file.hxx | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
New commits:
commit af5cc38cac0defcfc36796915e13ddd5969a7108
Author: Josh Heidenreich <josh.sickmate at gmail.com>
Date: Thu Mar 8 14:29:23 2012 +1030
sal file.hxx documentation
diff --git a/sal/inc/osl/file.hxx b/sal/inc/osl/file.hxx
index eb25e63..0ad8922 100644
--- a/sal/inc/osl/file.hxx
+++ b/sal/inc/osl/file.hxx
@@ -739,6 +739,7 @@ public:
@see getFileType
@see isRegular
@see isLink
+ @since 3.6
*/
inline sal_Bool isFile() const
{
@@ -752,6 +753,7 @@ public:
True if it's a directory, False otherwise.
@see getFileType
+ @since 3.6
*/
inline sal_Bool isDirectory() const
{
@@ -766,6 +768,7 @@ public:
@see getFileType
@see isFile
@see isLink
+ @since 3.6
*/
inline sal_Bool isRegular() const
{
@@ -778,6 +781,7 @@ public:
True if it's a link, False otherwise.
@see getFileType
+ @since 3.6
*/
inline sal_Bool isLink() const
{
commit b64352905ff5fc64e3b2d800766dcfd19b28f533
Author: Josh Heidenreich <josh.sickmate at gmail.com>
Date: Thu Mar 8 09:07:16 2012 +1030
Added FileStatus methods isFile, isDirectory, isRegular, isLink
diff --git a/sal/inc/osl/file.hxx b/sal/inc/osl/file.hxx
index 8c97750..eb25e63 100644
--- a/sal/inc/osl/file.hxx
+++ b/sal/inc/osl/file.hxx
@@ -730,6 +730,60 @@ public:
return (_aStatus.uValidFields & osl_FileStatus_Mask_Type) ? (Type) _aStatus.eType : Unknown;
}
+ /** Is it a file?
+ This method returns True for both regular files, and links.
+
+ @return
+ True if it's a file, False otherwise.
+
+ @see getFileType
+ @see isRegular
+ @see isLink
+ */
+ inline sal_Bool isFile() const
+ {
+ return ( getFileType() == Regular || getFileType() == Link );
+ }
+
+ /** Is it a directory?
+ This method returns True for both directories, and volumes.
+
+ @return
+ True if it's a directory, False otherwise.
+
+ @see getFileType
+ */
+ inline sal_Bool isDirectory() const
+ {
+ return ( getFileType() == Directory || getFileType() == Volume );
+ }
+
+ /** Is it a regular file?
+
+ @return
+ True if it's a regular file, False otherwise.
+
+ @see getFileType
+ @see isFile
+ @see isLink
+ */
+ inline sal_Bool isRegular() const
+ {
+ return ( getFileType() == Regular );
+ }
+
+ /** Is it a link?
+
+ @return
+ True if it's a link, False otherwise.
+
+ @see getFileType
+ */
+ inline sal_Bool isLink() const
+ {
+ return ( getFileType() == Link );
+ }
+
/** Get the file attributes.
@return
More information about the Libreoffice-commits
mailing list