Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clean-ide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
clean-ide
Commits
10111f02
Commit
10111f02
authored
Jul 11, 2018
by
John van Groningen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more LaunchApplication and LaunchApplication` from module UtilIO to module UtilObjectIO
parent
5ed8e23e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
54 deletions
+29
-54
Win/UtilIO.dcl
Win/UtilIO.dcl
+1
-4
Win/UtilIO.icl
Win/UtilIO.icl
+1
-50
Win/UtilObjectIO.dcl
Win/UtilObjectIO.dcl
+3
-0
Win/UtilObjectIO.icl
Win/UtilObjectIO.icl
+24
-0
No files found.
Win/UtilIO.dcl
View file @
10111f02
...
...
@@ -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.
...
...
Win/UtilIO.icl
View file @
10111f02
...
...
@@ -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
)
...
...
Win/UtilObjectIO.dcl
View file @
10111f02
...
...
@@ -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
)
Win/UtilObjectIO.icl
View file @
10111f02
...
...
@@ -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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment