Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
U
unix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rinat Striungis
unix
Commits
03cc9264
Commit
03cc9264
authored
10 years ago
by
Clemens Lang
Browse files
Options
Downloads
Patches
Plain Diff
Unify whitespace in System/Posix/Files/ByteString
parent
832ac1d6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
System/Posix/Files/ByteString.hsc
+12
-12
12 additions, 12 deletions
System/Posix/Files/ByteString.hsc
with
12 additions
and
12 deletions
System/Posix/Files/ByteString.hsc
+
12
−
12
View file @
03cc9264
...
...
@@ -145,22 +145,22 @@ fileExist name =
withFilePath name $ \s -> do
r <- c_access s (#const F_OK)
if (r == 0)
then return True
else do err <- getErrno
if (err == eNOENT)
then return False
else throwErrnoPath "fileExist" name
then return True
else do err <- getErrno
if (err == eNOENT)
then return False
else throwErrnoPath "fileExist" name
access :: RawFilePath -> CMode -> IO Bool
access name flags =
withFilePath name $ \s -> do
r <- c_access s (fromIntegral flags)
if (r == 0)
then return True
else do err <- getErrno
if (err == eACCES)
then return False
else throwErrnoPath "fileAccess" name
then return True
else do err <- getErrno
if (err == eACCES)
then return False
else throwErrnoPath "fileAccess" name
-- | @getFileStatus path@ calls gets the @FileStatus@ information (user ID,
...
...
@@ -276,7 +276,7 @@ readSymbolicLink file =
allocaArray0 (#const PATH_MAX) $ \buf -> do
withFilePath file $ \s -> do
len <- throwErrnoPathIfMinus1 "readSymbolicLink" file $
c_readlink s buf (#const PATH_MAX)
c_readlink s buf (#const PATH_MAX)
peekFilePathLen (buf,fromIntegral len)
foreign import ccall unsafe "readlink"
...
...
@@ -323,7 +323,7 @@ setSymbolicLinkOwnerAndGroup :: RawFilePath -> UserID -> GroupID -> IO ()
setSymbolicLinkOwnerAndGroup name uid gid = do
withFilePath name $ \s ->
throwErrnoPathIfMinus1_ "setSymbolicLinkOwnerAndGroup" name
(c_lchown s uid gid)
(c_lchown s uid gid)
foreign import ccall unsafe "lchown"
c_lchown :: CString -> CUid -> CGid -> IO CInt
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment