public bool IsFilePresent(IFileId fileId) { string pathToCheck = GetFullPath(fileId); return Directory.Exists(pathToCheck) || File.Exists(pathToCheck); }
public InvalidFileId(IFileId id) : base("\"" + id.ToString() + "\" is an invalid file id") { }
public void DeleteFile(IFileId fileId) { string pathToDelete = GetFullPath(fileId); RecursiveDelete(pathToDelete); }
/// <summary> /// Returns the full path to a given ID /// </summary> /// <param name="id"></param> /// <returns></returns> public string GetFullPath(IFileId id) { return Path.Combine(ConnectionString, id.ToString()); }
public IFileContainer ConstructFileContainer(IFileHandler fileHandler, IFileId fileId, string typeId, IDirectoryHandler parentDirectoryHandler, FileHandlerFactoryLocator fileHandlerFactoryLocator, DateTime created) { return new FileContainer(fileHandler, fileId, typeId, parentDirectoryHandler, fileHandlerFactoryLocator, created); }
public void RestoreFile(IFileId fileId, string pathToRestoreFrom, ID<IUserOrGroup, Guid> userId, IDirectoryHandler parentDirectory) { throw new NotImplementedException("File type isn't supported"); }
public IFileHandler OpenFile(IFileId fileId) { throw new NotImplementedException("File type isn't supported"); }
public void CreateFile(IFileId fileId) { throw new NotImplementedException("File type isn't supported"); }
public void CopyFile(IFileHandler sourceFileHandler, IFileId fileId, ID<IUserOrGroup, Guid>? ownerID, IDirectoryHandler parentDirectory) { throw new NotImplementedException("File type isn't supported"); }