00001 
00002 #ifndef FSUtilsH
00003 #define FSUtilsH
00004 
00005 #include <string>
00006 
00007 typedef unsigned long DWORD;
00008 
00009 namespace mdfs {
00010 
00011 class MURL;
00012 
00018 bool  IsSubFile(const std::string& f, const std::string& path, int rcount);
00019 
00020 
00021 int   ParseURL(const std::string& str, MURL& url);
00022 
00023 
00027 class MURL {
00028 public:
00029    MURL() : Port(5050), Error(-1) {}
00030 
00031    MURL& operator =(const std::string& url) {
00032       Error = ParseURL(url,*this);
00033       return *this;
00034       }
00035 
00036    std::string FullPath; 
00037    std::string Path; 
00038    std::string Prot; 
00039    std::string Host; 
00040    int         Port; 
00041    bool        IsValid() {return Error==0;}
00042    int         GetError() {return Error;}
00043 private:
00044    int Error;
00045    };
00046 
00047 } 
00048 
00049 #endif
00050