VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vlFilename.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
8 #pragma once
9 
10 #include "vlString.h"
11 
12 #ifdef DtUSE_UTILITIES_NAMESPACE
13 namespace DtUSE_UTILITIES_NAMESPACE
14 {
15 #endif
16 
21 {
22 public:
24  DtFilename();
25 
27  DtFilename(const char* str);
28 
30  virtual ~DtFilename();
31 
33  DtFilename(const DtFilename& orig);
34 
36  DtFilename& operator=(const DtFilename& orig);
37  DtFilename& operator=(const DtString& orig);
38  DtFilename& operator=(const char* orig);
39 
42  virtual bool absolute() const;
43  virtual bool relative() const;
44 
49  virtual void append(DtFilename const& filename);
50 
56  virtual void prepend(DtFilename const& pathName);
57 
61  virtual DtString extension() const;
62 
66  virtual void setExtension(const DtString& extension);
67 
69  virtual void stripFilename();
70 
72  virtual void stripPath();
73 
81  virtual void stripExtension();
82 
84  virtual bool isWritable() const;
85 
87  virtual bool isReadable() const;
88 
91  virtual unsigned long fileLength() const;
92 
94  virtual bool exists() const;
95 
102  virtual bool searchAlternatePath(const char *theAlternatePath);
103 
104 public:
105 
107  static const DtFilename& nullFilename();
108 
110  static DtFilename stripFilename(const DtFilename& orig);
111 
113  static DtFilename stripPath(const DtFilename& orig);
114 
116  static DtFilename stripExtension(const DtFilename& orig);
117 
123  static DtFilename combine(const DtFilename& path, const DtFilename& filename);
124 
128  static DtString absolutePath(const DtString& path, DtString& newAbsolutePath);
129 
131  static char separator();
132 
133 
134 protected:
139  void replaceSlashes();
140 
141 protected:
142  static const char theSeparator;
143 };
144 
145 #ifdef DtUSE_UTILITIES_NAMESPACE
146 }
147 #endif
Contains the DtString class declaration.
Instances of DtFilename are DtStrings which convert filenames to the native format.
Definition: vlFilename.h:20
static const char theSeparator
Definition: vlFilename.h:142
Instances of DtString are used to represent strings.
Definition: vlString.h:29
#define DT_DLL_VLUTIL
Definition: vlMachineTypes.h:109

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)