WinFile: Dealing with Files and Directories
WinFile is part of the CategoryAplTree project.
Important Note: WinFile has retired!
It's successor is FilesAndDirs which offers pretty much the same functionality but works under Windows, Linux and the Mac OS.
However, please note that FilesAndDirs uses the system functions for dealing with files and directories introduced in version 15.0 of Dyalog. It therefore needs at least 15.0, and it does not support the Classic version of Dyalog.
There is a page WinFileVersusFilesAndDirs that compares the functionality of the two classes in order to make a change as smooth as possible.
Nowadays if there is a need to deal with directories and files, there is .NET, right? Well, some companies have decided against .NET, so there is still the need for a .NET-free solution to this. This is what the WinFile class is designed for.
But there is more to say to this: try to get a DirectoryInfo for a directory with, say, 100,000 files. Then compare with this class.
See the list of methods (generated with ADOC):
Show the list of methods
Cd CheckPath CopyToWithRC CopyTo CreateDirParms CreateDirXParms CreateListFilesOnlyParms DateOf Delete DirTree DirX Dir DoesExistDir DoesExistFile DoesExist ExpandEnv ExpandPath GetAllDrives GetDriveAndType GetTempFileName GetTempPath History IsDirEmpty IsFilenameOkay IsFoldernameOkay IsValidWin32Filename ListDirsOnly ListFilesOnly ListDirXIndices ListFileAttributes MkDir MoveToWithRC MoveTo PolishCurrentDir PWD ReadAnsiFile ReadBytesAs8BitSignedIntegersFromFile RmDir Version WriteAnsiFile YoungerThan
Show the list of fields
COL_CreationDateName COL_LastAccessDate COL_LastWriteDate COL_Name COL_ShortName COL_Size FA_ARCHIVE FA_COMPRESSED FA_DEVICE FA_DIRECTORY FA_ENCRYPTED FA_HIDDEN FA_NORMAL FA_NOT_CONTENT_INDEXED FA_OFFLINE FA_READONLY FA_REPARSE_POINT FA_SPARSE_FILE FA_SYSTEM FA_TEMPORARY FA_VIRTUAL okay
Find out more by looking into the documentation WinFileDocumentation.html
For bug reports, future enhancements and a full version history see WinFile/ProjectPage
WinFile needs version 13.0 of Dyalog APL.