bump product version to 4.1.6.2
[LibreOffice.git] / include / cosv / ploc_dir.hxx
blobe6c8f04538f2fd300d80293e8c341776143bab5c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef CSV_PLOCDIR_HXX
21 #define CSV_PLOCDIR_HXX
24 // USED SERVICES
25 // BASE CLASSES
26 #include <cosv/persist.hxx>
27 // COMPONENTS
28 #include <cosv/ploc.hxx>
29 // PARAMETERS
31 namespace csv
33 namespace ploc
36 class DirectoryChain;
38 enum E_Recursivity
40 flat,
41 recursive
44 class Directory : public Persistent
46 public:
47 // LIFECYCLE
48 Directory();
49 Directory(
50 const Path & i_rLocation );
51 Directory(
52 const char * i_rLocation );
53 Directory(
54 const Directory & i_rDir );
55 virtual ~Directory();
57 // OPERATORS
58 Directory & operator+=(
59 const String & i_sName );
60 Directory & operator+=(
61 const DirectoryChain &
62 i_sDirChain );
63 Directory & operator-=(
64 uintt i_nLevels );
66 // OPERATIONS
67 bool PhysicalCreate(
68 bool i_bCreateParentsIfNecessary = true ) const;
70 // INQUIRY
71 void GetContainedDirectories(
72 StringVector & o_rResult ) const;
73 /** @param i_sFilter
74 Currently only filters of the form "*.ending" or "*.*"
75 (the default) are processed correctly under UNIX. Under WNT this
76 restriction does not apply.
78 void GetContainedFiles(
79 StringVector & o_rResult,
80 const char * i_sFilter = "*.*",
81 E_Recursivity i_eRecursivity = flat ) const;
82 private:
83 // Interface Peristent:
84 virtual const Path &
85 inq_MyPath() const;
87 // Locals:
88 /** @return
89 true, if parent(!) directory exists or could be created.
90 false, if this is a root directory.
92 bool Check_Parent() const;
93 bool PhysicalCreate_Dir(
94 const char * i_sStr ) const;
95 // DATA
96 Path aPath;
101 } // namespace ploc
102 } // namespace csv
106 #endif
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */