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 ...@@ -3,10 +3,7 @@ definition module UtilIO
import StdString, StdFile import StdString, StdFile
import UtilDate import UtilDate
LaunchApplication :: !{#Char} !{#Char} !Bool !Files -> ( !Bool, !Files) // Returns True if the file exists.
LaunchApplication` :: !{#Char} !Bool !Files -> ( !Bool, !Files)
// Returns True if the file name exists.
FExists :: !String !Files -> (!Bool, !Files) FExists :: !String !Files -> (!Bool, !Files)
// Returns the last modification date of the indicated file. // Returns the last modification date of the indicated file.
......
...@@ -17,23 +17,6 @@ FReadOnly path files ...@@ -17,23 +17,6 @@ FReadOnly path files
= (False,files) = (False,files)
= (fi.pi_fileInfo.isReadOnly,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 :: !{#Char} !*env -> (!(!Bool,!Int), !*env) | FileSystem env
FFileSize path files FFileSize path files
# ((ok,dir),files) = pd_StringToPath path files # ((ok,dir),files) = pd_StringToPath path files
...@@ -44,25 +27,6 @@ FFileSize path files ...@@ -44,25 +27,6 @@ FFileSize path files
= ((False,0),files) = ((False,0),files)
= ((True,fst fi.pi_fileInfo.fileSize),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 :: {#Char}
WinGetModulePath WinGetModulePath
= code inline = code inline
...@@ -84,20 +48,7 @@ WinFileExists _ ...@@ -84,20 +48,7 @@ WinFileExists _
ccall WinFileExists "S-I" ccall WinFileExists "S-I"
} }
//-- // Returns True if the file exists.
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.
*/
FExists :: !String !Files -> (!Bool, !Files) FExists :: !String !Files -> (!Bool, !Files)
FExists name files = (WinFileExists name, files) FExists name files = (WinFileExists name, files)
......
...@@ -11,3 +11,6 @@ ShellDefault :: !{#Char} !(PSt .l) -> (!Int,!(PSt .l)) ...@@ -11,3 +11,6 @@ ShellDefault :: !{#Char} !(PSt .l) -> (!Int,!(PSt .l))
GetDialogBackgroundColour :: !(PSt .l) -> (!Colour, !PSt .l) GetDialogBackgroundColour :: !(PSt .l) -> (!Colour, !PSt .l)
isWindow :: !Id *(PSt .l) -> (Bool,*(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)) ...@@ -352,3 +352,27 @@ isWindow :: !Id *(PSt .l) -> (Bool,*(PSt .l))
isWindow wId ps isWindow wId ps
# (s,ps) = accPIO getWindowsStack ps # (s,ps) = accPIO getWindowsStack ps
= (isMember wId s, 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