Platforms to show: All Mac Windows Linux Cross-Platform
WindowsFileInfoMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Windows | MBS Win Plugin | 10.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Example:
dim f as FolderItem = SelectFolder
if f<>Nil then
dim w as new WindowsFileInfoMBS(f)
MsgBox str(w.FileIndex)
end if
The identifier that is stored in the FileIndex members is called the file ID. Support for file IDs is file system-specific. File IDs are not guaranteed to be unique over time, because file systems are free to reuse them. In some cases, the file ID for a file can change over time.
In the FAT file system, the file ID is generated from the first cluster of the containing directory and the byte offset within the directory of the entry for the file. Some defragmentation products change this byte offset. (Windows in-box defragmentation does not.) Thus, a FAT file ID can change over time. Renaming a file in the FAT file system can also change the file ID, but only if the new file name is longer than the old one.
In the NTFS file system, a file keeps the same file ID until it is deleted. You can replace one file with another file without changing the file ID by using the ReplaceFile function. However, the file ID of the replacement file, not the replaced file, is retained as the file ID of the resulting file.
Not all file systems can record creation and last access time, and not all file systems record them in the same manner. For example, on a Windows FAT file system, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds, and access time has a resolution of 1 day (the access date). On the NTFS file system, access time has a resolution of 1 hour. For more information, see File Times.
- 12 properties
- property CreationDate as Date
- property CreationTime as UInt64
- property FileAttributes as Integer
- property FileIndex as UInt64
- property FileSize as UInt64
- property LastAccessDate as Date
- property LastAccessTime as UInt64
- property LastWriteDate as Date
- property LastWriteTime as UInt64
- property NumberOfLinks as Integer
- property Valid as Boolean
- property VolumeSerialNumber as Integer
- 4 methods
- method Constructor(file as folderitem)
- method Constructor(handle as Integer)
- method Constructor(path as string)
- method Constructor(stream as BinaryStream)
- 15 constants
- const kFileAttributeArchive = 32
- const kFileAttributeCompressed = 2048
- const kFileAttributeDevice = 64
- const kFileAttributeDirectory = 16
- const kFileAttributeEncrypted = 16384
- const kFileAttributeHidden = 2
- const kFileAttributeNormal = 128
- const kFileAttributeNotContentIndexed = 8192
- const kFileAttributeOffline = 4096
- const kFileAttributeReadonly = 1
- const kFileAttributeReparsePoint = 1024
- const kFileAttributeSparseFile = 512
- const kFileAttributeSystem = 4
- const kFileAttributeTemporary = 256
- const kFileAttributeVirtual = 65536
This class has no sub classes.
Some examples using this class:
Blog Entries
- MonkeyBread Software Releases the MBS Xojo Plugins in version 18.5
- MBS Xojo Plugins, version 18.5pr8
Xojo Developer Magazine
Videos
The items on this page are in the following plugins: MBS Win Plugin.
WindowsFileDescriptorMBS - WindowsFileStreamMBS
