Commit 10111f02 authored by John van Groningen's avatar John van Groningen

more LaunchApplication and LaunchApplication` from module UtilIO to module UtilObjectIO

parent 5ed8e23e
......@@ -3,10 +3,7 @@ definition module UtilIO
import StdString, StdFile
import UtilDate
LaunchApplication :: !{#Char} !{#Char} !Bool !Files -> ( !Bool, !Files)
LaunchApplication` :: !{#Char} !Bool !Files -> ( !Bool, !Files)
// Returns True if the file name exists.
// Returns True if the file exists.
FExists :: !String !Files -> (!Bool, !Files)
// Returns the last modification date of the indicated file.
......
......@@ -17,23 +17,6 @@ FReadOnly path files
= (False,files)
= (fi.pi_fileInfo.isReadOnly,files)
/* old version...
FReadOnly path files
# dir = RemoveFilename path
# fnm = RemovePath path
# ((ok,dir),files) = pd_StringToPath dir files
| not ok
= (False,files)
# ((err,dct),files) = getDirectoryContents dir files
| err <> NoDirError
= (False,files)
// # dct = map (\{fileInfo}->fileInfo.pi_fileInfo) dct
# dct = filter (\{fileName}->fileName==fnm) dct
| isEmpty dct
= (False,files)
= ((hd dct).fileInfo.pi_fileInfo.isReadOnly,files)
*/
FFileSize :: !{#Char} !*env -> (!(!Bool,!Int), !*env) | FileSystem env
FFileSize path files
# ((ok,dir),files) = pd_StringToPath path files
......@@ -44,25 +27,6 @@ FFileSize path files
= ((False,0),files)
= ((True,fst fi.pi_fileInfo.fileSize),files)
//--
:: OSToolbox :== Int
WinLaunchApp :: !{#Char} !Bool !*OSToolbox -> ( !Bool, !*OSToolbox)
WinLaunchApp _ _ _
= code inline
{
ccall WinLaunchApp "SII-II"
}
WinLaunchApp2 :: !{#Char} !{#Char} !Bool !*OSToolbox -> ( !Bool, !*OSToolbox)
WinLaunchApp2 _ _ _ _
= code inline
{
ccall WinLaunchApp2 "SSII-II"
}
WinGetModulePath :: {#Char}
WinGetModulePath
= code inline
......@@ -84,20 +48,7 @@ WinFileExists _
ccall WinFileExists "S-I"
}
//--
LaunchApplication :: !{#Char} !{#Char} !Bool !Files -> ( !Bool, !Files)
LaunchApplication execpath homepath console files
# (ok,_) = WinLaunchApp2 execpath homepath console 42
= (ok,files)
LaunchApplication` :: !{#Char} !Bool !Files -> ( !Bool, !Files)
LaunchApplication` execpath console files
# (ok,_) = WinLaunchApp execpath console 42
= (ok,files)
/* Returns True if the file name exists.
*/
// Returns True if the file exists.
FExists :: !String !Files -> (!Bool, !Files)
FExists name files = (WinFileExists name, files)
......
......@@ -11,3 +11,6 @@ ShellDefault :: !{#Char} !(PSt .l) -> (!Int,!(PSt .l))
GetDialogBackgroundColour :: !(PSt .l) -> (!Colour, !PSt .l)
isWindow :: !Id *(PSt .l) -> (Bool,*(PSt .l))
LaunchApplication :: !{#Char} !{#Char} !Bool !Files -> ( !Bool, !Files)
LaunchApplication` :: !{#Char} !Bool !Files -> ( !Bool, !Files)
......@@ -352,3 +352,27 @@ isWindow :: !Id *(PSt .l) -> (Bool,*(PSt .l))
isWindow wId ps
# (s,ps) = accPIO getWindowsStack ps
= (isMember wId s, ps)
WinLaunchApp :: !{#Char} !Bool !*OSToolbox -> ( !Bool, !*OSToolbox)
WinLaunchApp _ _ _
= code inline
{
ccall WinLaunchApp "SII-II"
}
WinLaunchApp2 :: !{#Char} !{#Char} !Bool !*OSToolbox -> ( !Bool, !*OSToolbox)
WinLaunchApp2 _ _ _ _
= code inline
{
ccall WinLaunchApp2 "SSII-II"
}
LaunchApplication :: !{#Char} !{#Char} !Bool !Files -> ( !Bool, !Files)
LaunchApplication execpath homepath console files
# (ok,_) = WinLaunchApp2 execpath homepath console 42
= (ok,files)
LaunchApplication` :: !{#Char} !Bool !Files -> ( !Bool, !Files)
LaunchApplication` execpath console files
# (ok,_) = WinLaunchApp execpath console 42
= (ok,files)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment