DIO is a utility class related to disk and file Input/Output using .Net. Each methods will return a 1 for success or 0 for failure wich make it easier under program control to take the proper action. The methods are:
⍝ BFileRead - Reads The Contents of a Binary File Into a Character Vector Without Encoding.
⍝ BFileWrite - Creates a New File, Write The Specified Character Vector to The File Without Encoding.
⍝ DialogFolder - Selects a Directory with FolderBrowserDialog.
⍝ DialogOpenFile - Selects a File to Open With OpenFileDialog.
⍝ DialogSaveFile - Selects a File to Save With SaveFileDialog.
⍝ DirCopy - Copies a Directory And Its Contents. SubDirectories Are Not Copied.
⍝ DirCreate - Creates All Directories And Subdirectories as Specified By Path.
⍝ DirDelete - Deletes The Specified Directory And Any Subdirectories in The Directory.
⍝ DirExists - Determines Whether The Given Path Refers to an Existing Directory on Disk.
⍝ DirMove - Moves a Directory And Its Contents. SubDirectories Are Moved.
⍝ DirRename - Renames a Directory (This Method is Identical to DirMove).
⍝ DirSize - Returns The Size in Bytes of a Directory And It's Subdirectories.
⍝ EncodingDetector - Returns The Encoding of a File And it's Content.
⍝ FileCopy - Copies an Existing File to a New File.
⍝ FileDelete - Deletes a File.
⍝ FileExists - Verifies if One or Many File(s) Exists.
⍝ FileMove - Moves a File to a New Location.
⍝ FileRename - Renames a File (This Method is Identical to FileMove).
⍝ FileSize - Returns The Size of a File in Bytes.
⍝ FileVersion - Returns The File Version of a File in Characters.
⍝ GetAttributes - Returns The Attributes of a File in Numeric And Litteral Form.
⍝ GetCreationTime - Returns The Creation Date And Time of a File as a DateTime Object.
⍝ GetDirCurrent - Returns The Current Directory Path.
⍝ GetDirectories - Returns The SubDirectories of a Directory.
⍝ GetDrives - Returns The Names of The Logical Drives on This Computer as "<drive letter>:\".
⍝ GetExtension - Returns The Extension of a Path String.
⍝ GetFiles - Returns The Names of Files in a Directory.
⍝ GetTempFileName - Returns a Uniquely Named Temporary File on Disk With Full Path.
⍝ GetTempPath - Returns The Path of The Current System's Temporary Folder.
⍝ SetAttributes - Sets The Attributes of a File.
⍝ SetDirCurrent - Sets The Current Directory Path.
⍝ TFileAppend - Appends The Specified Text to a File Using The Default Windows Code Page.
⍝ TFileRead - Reads The Contents of a Text File Using the Default Windows Code Page.
⍝ TFileWrite - Creates a New File, Writes The Text Using The Default Windows Code Page.
⍝ UFileAppend - Appends The Specified Text to a File Using The UTF-8 Encoding.
⍝ UFileRead - Reads The Contents of a Unicode Text File.
⍝ UFileWrite - Creates a New File, Writes The Text Using The UTF8 Encoding.
Pierre Gilbert
DIO-Disk and File Input/Output Utility Class [Contribution]
DIO-Disk and File Input/Output Utility Class [Contribution]
- Attachments
-
[The extension dyalog has been deactivated and can no longer be displayed.]
- Dick Bowman
- Posts: 235
- Joined: Thu Jun 18, 2009 4:55 pm
- Contact:
Re: DIO-Disk and File Input/Output Utility Class [Contribution]
That's very welcome - the sort of thing I'd like to see more of (might have one or two of my own one day).
Have we an "official repository"? Should we have one? A bit of FTP space on a server somewhere - maybe hosted by Dyalog? But please - lets not have too many rules, librarians and custodians.
Have we an "official repository"? Should we have one? A bit of FTP space on a server somewhere - maybe hosted by Dyalog? But please - lets not have too many rules, librarians and custodians.
Visit http://apl.dickbowman.com to read more from Dick Bowman
- Morten|Dyalog
- Posts: 460
- Joined: Tue Sep 09, 2008 3:52 pm
Re: DIO-Disk and File Input/Output Utility Class [Contribution]
The APLWiki SVN repository would be a good place, I think: http://aplwiki.com/AplWikiRepository