Exemplo n.º 1
0
        public bool IsFilePresent(IFileId fileId)
        {
            string pathToCheck = GetFullPath(fileId);

            return Directory.Exists(pathToCheck) || File.Exists(pathToCheck);
        }
Exemplo n.º 2
0
 public InvalidFileId(IFileId id)
     : base("\"" + id.ToString() + "\" is an invalid file id")
 {
 }
Exemplo n.º 3
0
 public void DeleteFile(IFileId fileId)
 {
     string pathToDelete = GetFullPath(fileId);
     RecursiveDelete(pathToDelete);
 }
Exemplo n.º 4
0
 /// <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());
 }
Exemplo n.º 5
0
 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");
 }