sipxportlib  Version 3.3
OsDirLinux.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 #ifndef _OsDir_h_
12 #define _OsDir_h_
13 
14 // SYSTEM INCLUDES
15 
16 // APPLICATION INCLUDES
17 #include "os/OsStatus.h"
18 #include "os/OsDefs.h"
19 #include "os/OsFS.h"
20 
21 // DEFINES
22 // MACROS
23 // EXTERNAL FUNCTIONS
24 // EXTERNAL VARIABLES
25 // CONSTANTS
26 // STRUCTS
27 // TYPEDEFS
28 // FORWARD DECLARATIONS
29 class OsFileInfoBase;
30 class OsDirBase;
31 class OsPathLinux;
32 class OsFileInfoLinux;
33 
34 //:Abstraction class to hande directory manipulations
35 class OsDirLinux : public OsDirBase
36 {
37 
38 /* //////////////////////////// PUBLIC //////////////////////////////////// */
39 public:
40 
41 /* ============================ CREATORS ================================== */
42 
43 
44  OsDirLinux(const char* pathname);
45  OsDirLinux(const OsPathLinux& rOsPath);
46 
47  OsDirLinux(const OsDirLinux& rOsDir);
48  //:Copy constructor
49 
50  virtual
51  ~OsDirLinux();
52  //:Destructor
53 
54 /* ============================ MANIPULATORS ============================== */
55 
56  OsStatus create(int permissions = 0755) const;
57  //: Create the path specified by this object
58  // Returns OS_SUCCESS if successful, or OS_INVALID
59 
60  OsStatus rename(const char* name);
61  //: Renames the current directory to the name specified
62  // Returns:
63  // OS_SUCCESS if successful
64  // OS_INVALID if failed
65 
66 /* ============================ ACCESSORS ================================= */
67 
68  OsStatus getFileInfo(OsFileInfoBase& rFileInfo) const;
69  //: Returns the file information for this objects path (see
70  //: OsFileInfo for more detail)
71  // Returns:
72  // OS_SUCCESS if successful
73  // OS_INVALID if failed
74 
75 /* ============================ INQUIRY =================================== */
76 
78  //: Returns TRUE if the directory specified by this object exists
79 
80 /* //////////////////////////// PROTECTED ///////////////////////////////// */
81 protected:
82  OsDirLinux();
83  //:Default constructor
84 
85  OsDirLinux& operator=(const OsDirLinux& rhs);
86  //:Assignment operator
87 
88 /* //////////////////////////// PRIVATE /////////////////////////////////// */
89 private:
90 
91 
92 };
93 
94 /* ============================ INLINE METHODS ============================ */
95 
96 #endif // _OsDir_h_
97 
98 
OsStatus getFileInfo(OsFileInfoBase &rFileInfo) const
Definition: OsDirLinux.cpp:110
UtlBoolean exists()
Definition: OsDirLinux.cpp:141
virtual ~OsDirLinux()
Definition: OsDirLinux.cpp:50
OsStatus
Definition: OsStatus.h:27
virtual OsStatus create() const
Definition: OsDirBase.cpp:91
Definition: OsFileInfoBase.h:34
Definition: OsFileInfoLinux.h:35
OsStatus rename(const char *name)
Definition: OsDirLinux.cpp:85
Definition: OsDirLinux.h:35
int UtlBoolean
Definition: UtlDefs.h:41
Definition: OsPathLinux.h:33
Definition: OsDirBase.h:32
OsDirLinux & operator=(const OsDirLinux &rhs)
Definition: OsDirLinux.cpp:57