public FileFsAttributeInformation(byte[] buffer, int offset) { FileSystemAttributes = (FileSystemAttributes)LittleEndianConverter.ToUInt32(buffer, offset + 0); MaximumComponentNameLength = LittleEndianConverter.ToUInt32(buffer, offset + 4); FileSystemNameLength = LittleEndianConverter.ToUInt32(buffer, offset + 8); FileSystemName = ByteReader.ReadUTF16String(buffer, offset + 12, (int)FileSystemNameLength / 2); }
public QueryFSAttibuteInfo(byte[] buffer, int offset) { FileSystemAttributes = (FileSystemAttributes)LittleEndianConverter.ToUInt32(buffer, offset + 0); MaxFileNameLengthInBytes = LittleEndianConverter.ToUInt32(buffer, offset + 4); uint lengthOfFileSystemName = LittleEndianConverter.ToUInt32(buffer, offset + 8); FileSystemName = ByteReader.ReadUTF16String(buffer, offset + 12, (int)(lengthOfFileSystemName / 2)); }
protected FileSystemItem(bool exists, string name, string fullPath, DateTime lastWriteTime, DateTime createTime, FileSystemAttributes attributes, string parent, string parentFullPath) { Exists = exists; Name = name; FullPath = fullPath; LastWriteTime = lastWriteTime; CreateTime = createTime; Attributes = attributes; Parent = parent; ParentFullPath = parentFullPath; }
public override NT_STATUS FSInfo(UserContext UserContext, out FileSystemAttributes data) { // Should be implemented very fast, as this method is called quite often // Try to implement is without any I/O or cache the I/O results. base.FSInfo(UserContext, out data); data.FSName = "iPhoneFS"; data.SectorUnit = 1; // FreeBytes and TotalBytes will me multiplied by this value data.Sectors = 1; // FreeBytes and TotalBytes will be multiplied by this value //FIXME: cache/decache this info? phone.RefreshFileSystemInfo(); data.FreeBytes = phone.FileSystemFreeBytes; data.TotalBytes = phone.FileSystemTotalBytes; return(NT_STATUS.OK); }
private FileAttributes GetFileAttributes(FileSystemAttributes attributes) { FileAttributes fileAttributes = 0; if ((attributes & FileSystemAttributes.ReadOnly) != 0) { fileAttributes |= FileAttributes.ReadOnly; } if ((attributes & FileSystemAttributes.Hidden) != 0) { fileAttributes |= FileAttributes.Hidden; } if ((attributes & FileSystemAttributes.System) != 0) { fileAttributes |= FileAttributes.System; } if ((attributes & FileSystemAttributes.Archive) != 0) { fileAttributes |= FileAttributes.Archive; } if ((attributes & FileSystemAttributes.Device) != 0) { fileAttributes |= FileAttributes.Device; } if ((attributes & FileSystemAttributes.Normal) != 0) { fileAttributes |= FileAttributes.Normal; } if ((attributes & FileSystemAttributes.Temporary) != 0) { fileAttributes |= FileAttributes.Temporary; } if ((attributes & FileSystemAttributes.SparseFile) != 0) { fileAttributes |= FileAttributes.SparseFile; } if ((attributes & FileSystemAttributes.ReparsePoint) != 0) { fileAttributes |= FileAttributes.ReparsePoint; } if ((attributes & FileSystemAttributes.Compressed) != 0) { fileAttributes |= FileAttributes.Compressed; } if ((attributes & FileSystemAttributes.Offline) != 0) { fileAttributes |= FileAttributes.Offline; } if ((attributes & FileSystemAttributes.NotContentIndexed) != 0) { fileAttributes |= FileAttributes.NotContentIndexed; } if ((attributes & FileSystemAttributes.Encrypted) != 0) { fileAttributes |= FileAttributes.Encrypted; } if ((attributes & FileSystemAttributes.IntegrityStream) != 0) { fileAttributes |= FileAttributes.IntegrityStream; } if ((attributes & FileSystemAttributes.NoScrubData) != 0) { fileAttributes |= FileAttributes.NoScrubData; } return(fileAttributes); }
public override NT_STATUS FSInfo(UserContext UserContext, out FileSystemAttributes data) { // Should be implemented very fast, as this method is called quite often // Try to implement is without any I/O or cache the I/O results. base.FSInfo(UserContext, out data); data.FSName = "iPhoneFS"; data.SectorUnit = 1; // FreeBytes and TotalBytes will me multiplied by this value data.Sectors = 1; // FreeBytes and TotalBytes will be multiplied by this value //FIXME: cache/decache this info? phone.RefreshFileSystemInfo(); data.FreeBytes = phone.FileSystemFreeBytes; data.TotalBytes = phone.FileSystemTotalBytes; return NT_STATUS.OK; }
public override NT_STATUS FSInfo(UserContext UserContext, out FileSystemAttributes data) { return(base.FSInfo(UserContext, out data)); }