public DateTimeOffset GetFolderLastAccessTime(string path) { //Can happen... path = path.Trim(); if (path[1] != ':') { throw new Exception("Not absolute path: " + path); } if (path.Length == 2) { if (path[1] == ':') { return(new DateTimeOffset()); } } RscStore_Base store = GetStore(path); if (store == null) { throw new Exception("Unknown store: " + path); } return(store.GetFolderLastAccessTime(GetStorePath(path))); }
protected RscStore_Base GetStore(string sPath) { if (sPath.Length < 2) { return(null); } if (sPath[1] != ':') { return(null); } RscStore_Base store = null; switch (sPath[0]) { case 'A': case 'a': store = new RscStore_IsoStore(); break; case 'B': case 'b': store = new RscStore_KnownFolders(); break; default: store = new RscStore_Storage(); break; } store = store.GetSpecialStorage(GetStorePath(sPath)); return(store); }
public RscStoreProperties GetFolderProperties(string path) { //Can happen... path = path.Trim(); if (path[1] != ':') { throw new Exception("Not absolute path: " + path); } if (path.Length == 2) { if (path[1] == ':') { return(new RscStoreProperties()); } } RscStore_Base store = GetStore(path); if (store == null) { throw new Exception("Unknown store: " + path); } return(store.GetFolderProperties(GetStorePath(path))); }
public DateTimeOffset GetFileLastAccessTime(string path) { if (path[1] != ':') { throw new Exception("Not absolute path: " + path); } RscStore_Base store = GetStore(path); if (store == null) { throw new Exception("Unknown store: " + path); } return(store.GetFileLastAccessTime(GetStorePath(path))); }
public long GetFileLength(string path) { if (path[1] != ':') { throw new Exception("Not absolute path: " + path); } RscStore_Base store = GetStore(path); if (store == null) { return(0); } return(store.GetFileLength(GetStorePath(path))); }
public RscStoreProperties GetFileProperties(string path) { if (path[1] != ':') { throw new Exception("Not absolute path: " + path); } RscStore_Base store = GetStore(path); if (store == null) { throw new Exception("Unknown store: " + path); } return(store.GetFileProperties(GetStorePath(path))); }
public bool FileExists(string path) { if (path[1] != ':') { throw new Exception("Not absolute path: " + path); } RscStore_Base store = GetStore(path); if (store == null) { throw new Exception("Unknown store: " + path); } return(store.FileExists(GetStorePath(path))); }
public System.IO.Stream GetReaderStream(string path, bool bForPreview = false) { if (path[1] != ':') { throw new Exception("Not absolute path: " + path); } RscStore_Base store = GetStore(path); if (store == null) { throw new Exception("Unknown store: " + path); } return(store.GetReaderStream(GetStorePath(path), bForPreview)); }
public System.IO.Stream CreateFile(string path) { if (path[1] != ':') { throw new Exception("Not absolute path: " + path); } RscStore_Base store = GetStore(path); if (store == null) { throw new Exception("Unknown store: " + path); } return(store.CreateFile(GetStorePath(path))); }
public void DeleteFile(string path) { if (path[1] != ':') { throw new Exception("Not absolute path: " + path); } RscStore_Base store = GetStore(path); if (store == null) { throw new Exception("Unknown store: " + path); } store.DeleteFile(GetStorePath(path)); }
public string GetOriginalFileNameOfPath(string path) { if (path[1] != ':') { throw new Exception("Not absolute path: " + path); } RscStore_Base store = GetStore(path); if (store == null) { throw new Exception("Unknown store: " + path); } return(store.GetOriginalFileNameOfPath(GetStorePath(path))); }
// // // // public bool IsFolderImageOnly(string path) { if (path[1] != ':') { throw new Exception("Not absolute path: " + path); } RscStore_Base store = GetStore(path); if (store == null) { throw new Exception("Unknown store: " + path); } return(store.IsFolderImageOnly(GetStorePath(path))); }
public bool FolderExists(string path) { //Can happen... if (path.Trim().Length == 0) { return(true); //Holder of drives exists and walkable... } if (path[1] != ':') { throw new Exception("Not absolute path: " + path); } RscStore_Base store = GetStore(path); if (store == null) { throw new Exception("Unknown store: " + path); } return(store.FolderExists(GetStorePath(path))); }
public void CreateFolder(string path) { if (path[1] != ':') { throw new Exception("Not absolute path: " + path); } RscStore_Base store = GetStore(path); if (store == null) { throw new Exception("Unknown store: " + path); } string sStorePath = GetStorePath(path); if (!store.FolderExists(sStorePath)) //Do not delete this... ...backward compatibility. { store.CreateFolder(sStorePath); } }
public string [] GetFolderNames(string path, string wildcard, bool bIncludeHidden = true, bool bStartWithInfChr = false) { //Can happen... path = path.Trim(); //MUST NOT!!! Called to list drives... //if( searchPattern[ 1 ] != ':' ) throw new Exception( "Not absolute path: " + searchPattern ); if (path.Length == 0) { return(GetRoots(bIncludeHidden, bStartWithInfChr)); } RscStore_Base store = GetStore(path); if (store == null) { throw new Exception("Unknown store: " + path); } return(store.GetFolderNames(GetStorePath(path), wildcard, bIncludeHidden, bStartWithInfChr)); }