Package RASCAL.FileName
Description
Manipulating filenames. Converting from DOS to RISC OS, or from Web to RISC OS.
Author
bbracke
Date
2005/11/21 20:14:33
Revision
1.1
Clauses
Quick access :
Clauses
-
Generics
-
Definitions
-
Subprograms
Context clauses
RASCAL.Utility
Use clauses
RASCAL.Utility
Definitions
Quick access :
Clauses
-
Generics
-
Definitions
-
Subprograms
Types
Name
Declaration
Paths_Type
array (natural) of UString
Path_Pointer
access Paths_Type
Subprograms
Quick access :
Clauses
-
Generics
-
Definitions
-
Subprograms
Make_FileName
function
Return
String
Replaces illegal characters with '_' to create valid filenames.
Parameter name
Type
Mode
Default
Name
String
in
Convert_Path
function
Return
String
This function canonicalises the 'Path'.
It takes a filename (which may contain wildcards) and converts it into a complete pathmame, including disc and directory name when not provided.
Example: fred may convert to SCSI::Gamma.$.Utils.Fred
Parameter name
Type
Mode
Default
Path
String
in
Get_FS
function
Return
String
Returns the filing system part the 'Path'.
Parameter name
Type
Mode
Default
Path
String
in
Get_FS_And_Drive
function
Return
String
Returns the filing system and drive part the 'Path'.
Parameter name
Type
Mode
Default
Path
String
in
Get_Leaf
function
Return
String
Takes a filepath and returns the leafname.
Parameter name
Type
Mode
Default
Path
String
in
Get_Path
function
Return
String
takes a full pathname and returns the path, including the seperator ('.', ':', '<...$Path>').
Parameter name
Type
Mode
Default
Path
String
in
Web_To_RISCOS
function
Return
String
Converts a web-format path to RISC OS format.
Parameter name
Type
Mode
Default
Path
String
in
No_Extensions
Boolean
in
true
Mixed_Case
Boolean
in
true
RISCOS_To_web
function
Return
String
Converts a RISC OS format path to web format.
Parameter name
Type
Mode
Default
Path
String
in
DOS_To_RISCOS
function
Return
String
Converts a DOS/Windows path to RISC OS format.
Parameter name
Type
Mode
Default
Path
String
in
No_Extensions
Boolean
in
true
Mixed_Case
Boolean
in
true
App_To_Dir
function
Return
String
Remove plings from beginning of name.
Parameter name
Type
Mode
Default
Original
String
in
Seperate_Paths
function
Return
Paths_Type
Splits a paths string containing several commaseperated paths into its elements and returns an array of those paths.
Parameter name
Type
Mode
Default
Path
String
in