00001 // ======================================================================== //
00002 // //
00003 // File : read_lnk.h //
00004 // Purpose : //
00005 // Time-stamp: <Mon Dec/02/2002 01:49 MET Coder@ReallySoft.de> //
00006 // //
00007 // (C) August 2002 by Ralf Westram //
00008 // //
00009 // Permission to use, copy, modify, distribute and sell this software //
00010 // and its documentation for any purpose is hereby granted without fee, //
00011 // provided that the above copyright notice appear in all copies and //
00012 // that both that copyright notice and this permission notice appear //
00013 // in supporting documentation. //
00014 // //
00015 // Ralf Westram makes no representations about the suitability of this //
00016 // software for any purpose. It is provided "as is" without express or //
00017 // implied warranty. //
00018 // //
00019 // ======================================================================== //
00020
00021 #ifndef READ_LNK_H
00022 #define READ_LNK_H
00023
00024 #ifndef STRING
00025 #include <string>
00026 #endif
00027
00028
00029 namespace rs {
00030
00032 class Lnk {
00033 private:
00034 std::string filename;
00035 std::string target;
00036
00037 bool points_to_file_or_directory_;
00038 bool target_is_directory;
00039
00040 public:
00044 Lnk(const std::string& filename_);
00045 virtual ~Lnk() {}
00046
00048 bool points_to_file_or_directory() const { return points_to_file_or_directory_; }
00049
00051 bool is_valid() const;
00052
00054 bool points_to_directory() const { return points_to_file_or_directory() && target_is_directory; }
00055
00057 bool points_to_file() const { return points_to_file_or_directory() && !target_is_directory; }
00058
00060 const std::string& get_target() const { return target; }
00061 };
00062
00063
00064 }; // end of namespace rs
00065
00066 #else
00067 #error read_lnk.h included twice
00068 #endif // READ_LNK_H
00069
|
Contact me in case of errors or questions. This documentation is powered by |
(C) 2000-2002 |