예제 #1
0
 public void Cleanup(IFSEntryPointer pFileDesc, bool pCleanupDelete)
 {
     if (pCleanupDelete)
     {
         (pFileDesc as PassthroughFile)?.Close();
     }
 }
예제 #2
0
 public int SetSecurity(IFSEntryPointer pFileDesc, AccessControlSections pSections, byte[] pSecurityDescriptor)
 {
     if (pFileDesc is PassthroughFileSystemBase pointer)
     {
         return(pointer.SetSecurityDescriptor(pSections, pSecurityDescriptor));
     }
     return(FileSystemStatus.STATUS_SUCCESS);
 }
예제 #3
0
 public int GetSecurity(IFSEntryPointer pFileDesc, ref byte[] pSecurityDescriptor)
 {
     if (pFileDesc is PassthroughFileSystemBase pointer)
     {
         pSecurityDescriptor = pointer.GetSecurityDescriptor();
     }
     return(FileSystemStatus.STATUS_SUCCESS);
 }
예제 #4
0
 public int SetFileSize(object pFileNode, IFSEntryPointer pFileDesc, ulong pNewSize, bool pSetAllocationSize, out IEntry pEntry)
 {
     if (pFileDesc is PassthroughFile pointer)
     {
         return(pointer.SetFileSize(pNewSize, pSetAllocationSize, out pEntry));
     }
     pEntry = default;
     return(FileSystemStatus.STATUS_SUCCESS);
 }
예제 #5
0
 public bool ReadDirectory(object pFileNode, IFSEntryPointer pFileDesc, string pPattern, string pMarker, ref object pContext, out string pFileName, out IEntry pEntry)
 {
     pFileName = default;
     pEntry    = default;
     if (pFileDesc is IO.Directory pointer)
     {
         return(pointer.ReadDirectory(pPattern, pMarker, ref pContext, out pFileName, out pEntry));
     }
     return(false);
 }
예제 #6
0
 public static FileInformation ToFileInformation(
     this IFSEntryPointer entry
     ) => new FileInformation()
 {
     Attributes     = entry.Attributes,
     CreationTime   = entry.CreationTime,
     FileName       = entry.Name,
     LastAccessTime = entry.LastAccessTime,
     LastWriteTime  = entry.LastWriteTime,
     Length         = entry.FileSize
 };
예제 #7
0
 public int GetFileInfo(IFSEntryPointer pFileDesc, out IEntry pEntry)
 {
     if (pFileDesc is PassthroughFileSystemBase pointer)
     {
         pEntry = pointer.GetEntry();
     }
     else
     {
         pEntry = default;
     }
     return(FileSystemStatus.STATUS_SUCCESS);
 }
예제 #8
0
 public int Flush(IFSEntryPointer pFileDesc, out IEntry pEntry)
 {
     if (pFileDesc is PassthroughFile pointer)
     {
         return(pointer.Flush(out pEntry));
     }
     else
     {
         pEntry = default;
         return(FileSystemStatus.STATUS_SUCCESS);
     }
 }
예제 #9
0
 public int OverWrite(IFSEntryPointer pFileDesc, uint pFileAttributes, bool pReplaceFileAttributes, out IEntry pEntry)
 {
     if (pFileDesc is PassthroughFile pointer)
     {
         return(pointer.OverWrite(pFileAttributes, pReplaceFileAttributes, out pEntry));
     }
     else
     {
         pEntry = default;
     }
     return(FileSystemStatus.STATUS_SUCCESS);
 }
예제 #10
0
 public int Read(IFSEntryPointer pFileDesc, IntPtr pBuffer, ulong pOffset, uint pLength, out uint pBytesTransferred)
 {
     if (pFileDesc is PassthroughFile pointer)
     {
         return(pointer.Read(pBuffer, pOffset, pLength, out pBytesTransferred));
     }
     else
     {
         pBytesTransferred = 0;
     }
     return(FileSystemStatus.STATUS_SUCCESS);
 }
예제 #11
0
 public int SetBasicInfo(IFSEntryPointer pFileDesc, uint pFileAttributes, ulong pCreationTime, ulong pLastAccessTime, ulong pLastWriteTime, ulong pChangeTime, out IEntry pEntry)
 {
     if (pFileDesc is PassthroughFileSystemBase pointer)
     {
         return(pointer.SetBasicInfo(pFileAttributes, pCreationTime, pLastAccessTime, pLastWriteTime, out pEntry));
     }
     else
     {
         pEntry = default;
     }
     return(FileSystemStatus.STATUS_SUCCESS);
 }
예제 #12
0
 public int Write(object pFileNode, IFSEntryPointer pFileDesc, IntPtr pBuffer, ulong pOffset, uint pLength, bool pWriteToEndOfFile, bool pConstrainedIo, out uint pBytesTransferred, out IEntry pEntry)
 {
     if (pFileDesc is PassthroughFile pointer)
     {
         return(pointer.Write(pBuffer, pOffset, pLength, pWriteToEndOfFile, pConstrainedIo, out pBytesTransferred, out pEntry));
     }
     else
     {
         pEntry            = default;
         pBytesTransferred = 0;
         return(FileSystemStatus.STATUS_SUCCESS);
     }
 }
예제 #13
0
        public int Open(string pFileName, uint pGrantedAccess, out object pFileNode, out IFSEntryPointer pFileDesc, out IEntry pEntry, out string pNormalizedName)
        {
            var FullPath = PathNormalizer.ConcatPath(SourcePath, pFileName);

            if (DirectoryActions.Exists(FullPath))
            {
                pFileDesc = DirectoryActions.Open(FullPath, out pEntry);
            }
            else if (FileActions.Exists(FullPath))
            {
                pFileDesc = FileActions.Open(FullPath, pGrantedAccess, out pEntry);
            }
            else
            {
                pFileDesc = default;
                pEntry    = default;
            }
            pNormalizedName = default;
            pFileNode       = default;
            return(FileSystemStatus.STATUS_SUCCESS);
        }
예제 #14
0
 public Result SetAllocationSize(string fileName, long length, IFSEntryPointer info) => throw new NotImplementedException();
예제 #15
0
 public Result SetBasicInfo(IFSEntryPointer pFileDesc, FileAttributes pFileAttributes, DateTime pCreationTime, DateTime pLastAccessTime, DateTime pLastWriteTime, DateTime pChangeTime) => throw new NotImplementedException();
예제 #16
0
 public Result Read(IFSEntryPointer pEntry, out byte[] pBuffer, long pOffset, int pLength, out int pBytesTransferred) => throw new NotImplementedException();
예제 #17
0
 public Result ReadDirectory(IFSEntryPointer pFileDesc, string pPattern, bool pCaseSensitive, string pMarker, out IFSEntryPointer[] pEntries) => throw new NotImplementedException();
예제 #18
0
 public Result Open(string pFileName, uint pGrantedAccess, out object pFileNode, out IFSEntryPointer pFileDesc, out IEntry pEntry, out string pNormalizedName) => throw new NotImplementedException();
예제 #19
0
 public Result OverWrite(IFSEntryPointer pFileDesc, FileAttributes pFileAttributes, bool pReplaceFileAttributes, out IEntry pEntry) => throw new NotImplementedException();
예제 #20
0
 public Result GetSecurity(IFSEntryPointer pFileDesc, out FileSystemSecurity pSecurity) => throw new NotImplementedException();
예제 #21
0
 public Result GetFileInfo(string pPath, out IFSEntryPointer pFileDesc) => throw new NotImplementedException();
예제 #22
0
 public Result SetFileSize(IFSEntryPointer pEntry, long pNewSize) => throw new NotImplementedException();
예제 #23
0
 public Result Write(IFSEntryPointer pFileDesc, byte[] pBuffer, long pOffset, out int pBytesTransferred) => throw new NotImplementedException();
예제 #24
0
 public Result SetSecurity(IFSEntryPointer iFSEntryPointer, FileSystemSecurity security) => throw new NotImplementedException();
예제 #25
0
 public Result SetSecurity(IFSEntryPointer pFileDesc, AccessControlSections pSections, byte[] pSecurityDescriptor) => throw new NotImplementedException();
예제 #26
0
 public Result Delete(IFSEntryPointer pEntry, bool pRecursive) => throw new NotImplementedException();
예제 #27
0
 public Result UnLock(IFSEntryPointer iFSEntryPointer, long offset, long length) => throw new NotImplementedException();
예제 #28
0
 public Result Flush(IFSEntryPointer pFileDesc) => throw new NotImplementedException();
 public Result Create(string fileName, bool isfile, System.IO.FileAccess access, System.IO.FileShare share, System.IO.FileMode mode, System.IO.FileOptions options, System.IO.FileAttributes attributes, out IFSEntryPointer node)
 {
     return(PassthroughFile.CreateFile(FileSystem, PathNormalizer.ConcatPath(SourcePath, fileName), access, share, mode, options, attributes, !isfile, out node));
 }
예제 #30
0
 public Result GetFileInfo(IFSEntryPointer pFileDesc, out IEntry pEntry) => throw new NotImplementedException();