public void Cleanup(IFSEntryPointer pFileDesc, bool pCleanupDelete) { if (pCleanupDelete) { (pFileDesc as PassthroughFile)?.Close(); } }
public int SetSecurity(IFSEntryPointer pFileDesc, AccessControlSections pSections, byte[] pSecurityDescriptor) { if (pFileDesc is PassthroughFileSystemBase pointer) { return(pointer.SetSecurityDescriptor(pSections, pSecurityDescriptor)); } return(FileSystemStatus.STATUS_SUCCESS); }
public int GetSecurity(IFSEntryPointer pFileDesc, ref byte[] pSecurityDescriptor) { if (pFileDesc is PassthroughFileSystemBase pointer) { pSecurityDescriptor = pointer.GetSecurityDescriptor(); } return(FileSystemStatus.STATUS_SUCCESS); }
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); }
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); }
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 };
public int GetFileInfo(IFSEntryPointer pFileDesc, out IEntry pEntry) { if (pFileDesc is PassthroughFileSystemBase pointer) { pEntry = pointer.GetEntry(); } else { pEntry = default; } return(FileSystemStatus.STATUS_SUCCESS); }
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); } }
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); }
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); }
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); }
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); } }
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); }
public Result SetAllocationSize(string fileName, long length, IFSEntryPointer info) => throw new NotImplementedException();
public Result SetBasicInfo(IFSEntryPointer pFileDesc, FileAttributes pFileAttributes, DateTime pCreationTime, DateTime pLastAccessTime, DateTime pLastWriteTime, DateTime pChangeTime) => throw new NotImplementedException();
public Result Read(IFSEntryPointer pEntry, out byte[] pBuffer, long pOffset, int pLength, out int pBytesTransferred) => throw new NotImplementedException();
public Result ReadDirectory(IFSEntryPointer pFileDesc, string pPattern, bool pCaseSensitive, string pMarker, out IFSEntryPointer[] pEntries) => throw new NotImplementedException();
public Result Open(string pFileName, uint pGrantedAccess, out object pFileNode, out IFSEntryPointer pFileDesc, out IEntry pEntry, out string pNormalizedName) => throw new NotImplementedException();
public Result OverWrite(IFSEntryPointer pFileDesc, FileAttributes pFileAttributes, bool pReplaceFileAttributes, out IEntry pEntry) => throw new NotImplementedException();
public Result GetSecurity(IFSEntryPointer pFileDesc, out FileSystemSecurity pSecurity) => throw new NotImplementedException();
public Result GetFileInfo(string pPath, out IFSEntryPointer pFileDesc) => throw new NotImplementedException();
public Result SetFileSize(IFSEntryPointer pEntry, long pNewSize) => throw new NotImplementedException();
public Result Write(IFSEntryPointer pFileDesc, byte[] pBuffer, long pOffset, out int pBytesTransferred) => throw new NotImplementedException();
public Result SetSecurity(IFSEntryPointer iFSEntryPointer, FileSystemSecurity security) => throw new NotImplementedException();
public Result SetSecurity(IFSEntryPointer pFileDesc, AccessControlSections pSections, byte[] pSecurityDescriptor) => throw new NotImplementedException();
public Result Delete(IFSEntryPointer pEntry, bool pRecursive) => throw new NotImplementedException();
public Result UnLock(IFSEntryPointer iFSEntryPointer, long offset, long length) => throw new NotImplementedException();
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)); }
public Result GetFileInfo(IFSEntryPointer pFileDesc, out IEntry pEntry) => throw new NotImplementedException();