aboutsummaryrefslogtreecommitdiffhomepage
path: root/System/Posix/Files.hsc
Commit message (Collapse)AuthorAge
* Fix error message of `createSymbolicLink`.Gravatar Niklas Hambüchen2017-02-08
| | | | | | | | | | | | | | | | | | | | | Consider `ln` (or any other Unix tool): $ ln -s file1 file2 $ ls -l file2 lrwxrwxrwx 1 niklas niklas 5 Feb 8 03:09 file2 -> file1 $ ln -s file1 file2 ln: failed to create symbolic link 'file2': File exists The file name mentioned in the error ("link2") is the one that *could not be created*, not the content of the pointer. `createSymbolicLink` got this wrong so far, it would print file1: createSymbolicLink: already exists (File exists) which is wrong, this file doesn't already exist. This commit fixes it.
* Convert /since/ to @since syntaxGravatar Herbert Valerio Riedel2016-04-19
|
* Drop redundant __GLASGOW_HASKELL__ conditionals for GHC>=7.4Gravatar Herbert Valerio Riedel2016-01-31
|
* Replace `__hsunix_mknod` wrapper with CApiFFIGravatar Herbert Valerio Riedel2016-01-30
|
* Replace `__hsunix_lstat` wrapper with CApiFFIGravatar Herbert Valerio Riedel2016-01-30
|
* More fixes for Safe Haskell bounds under GHC 7.10Gravatar David Terei2014-12-08
|
* Merge pull request #18 from neverpanic/masterGravatar Herbert Valerio Riedel2014-11-07
|\ | | | | `System.Posix.Files.fileAccess` fails inside OS X sandbox
* | Use CAPI FFI imports for `truncate`Gravatar Herbert Valerio Riedel2014-10-18
| | | | | | | | | | This makes sure we pick up the LFS version of `truncate` in case `off_t` is affected by CPP defines such as `_FILE_OFFSET_BITS`.
| * Accept EPERM as valid error code for access(2)Gravatar Clemens Lang2014-09-21
|/ | | | | | | This is useful on OS X when its sandboxing mechanism is used, because that will set errno = EPERM when a file can't be written due to sandboxing (as opposed to setting it to EACCES when file permissions deny writing).
* Use import list for `Data.Time.Clock.POSIX`Gravatar Herbert Valerio Riedel2014-09-10
| | | | | This makes it more obvious why `unix` depends on `time` in the first place, i.e. for the sole purpose of reusing the `POSIXTime` type.
* fix getFileStatus: interrupted (Interrupted system call) build failure on ↵Gravatar Karel Gardas2014-02-28
| | | | | | | | | Solaris Patch provided by Christian Maeder <Christian.Maeder@dfki.de> Signed-off-by: Karel Gardas <karel.gardas@centrum.cz> Signed-off-by: Austin Seipp <austin@well-typed.com>
* M-x delete-trailing-whitespace & M-x untabifyGravatar Herbert Valerio Riedel2014-02-06
| | | | Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Handle EROFS/ETXTBSY as permission denied in `fileAccess` (re #8741)Gravatar Alain O'Dea2014-02-06
| | | | | | | | | | This extends `System.Posix.Files.`access` to map EROFS & ETXTBSY to mean permission denied just like EACCESS. Based on a patch by Alain O'Dea and comments by Duncan Coutts Authored-by: Alain O'Dea <alain.odea@verafin.com> Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Make `-Wall` clean and drop `-fno-warn-unused-imports`Gravatar Herbert Valerio Riedel2013-10-12
| | | | | | | | | CPP conditional code sections have been carefully taken into account while performing this warning cleanup. Most `OPTIONS_GHC` declarations could be dropped (now only a lonely `{-# OPTIONS_GHC -fno-cse #-}` remains in `Posix.Signals`). Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Add `changelog` file and `/Since: 2.7.0.0/` notesGravatar Herbert Valerio Riedel2013-10-12
| | | | | | | The changelog file will be shown on Hackage once it's included in the source tarball. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Declare language extensions via `{-# LANGUAGE -#}`Gravatar Herbert Valerio Riedel2013-10-12
| | | | | | | | | Only language extensions not active when `-XHaskell2010` is enabled are declared, this way we can drop many redundant `{-# LANGUAGE ForeignFunctionInterface #-}` occurences. This commit also removes/replaces some `{-# OPTIONS_GHC -XRecordWildCards #-}` pragmas. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Bump base lower version to 4.5 (the version GHC 7.4.1 came with)Gravatar Ian Lynagh2012-11-30
| | | | and remove code to support older versions
* Add functions for setting file times with high resolutionGravatar Marios Titas2012-09-03
|
* Extract high resolution timestamps from FileStatusGravatar Marios Titas2012-07-17
| | | | Signed-off-by: Paolo Capriotti <p.capriotti@gmail.com>
* Provide a raw ByteString version of FilePath and environment APIsGravatar Simon Marlow2011-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | The new module System.Posix.ByteString provides exactly the same API as System.Posix, except that: - There is a new type: RawFilePath = ByteString - All functions mentioning FilePath in the System.Posix API use RawFilePath in the System.Posix.ByteString API - RawFilePaths are not subject to Unicode locale encoding and decoding, unlike FilePaths. They are the exact bytes passed to and returned from the underlying POSIX API. - Similarly for functions that deal in environment strings (System.Posix.Env): these use untranslated ByteStrings in System.Posix.Environment - There is a new function System.Posix.ByteString.getArgs :: [ByteString] returning the raw untranslated arguments as passed to exec() when the program was started.
* Fix conditional pragma to work with 6.12Gravatar David Terei2011-08-09
|
* Use Safe Haskell when GHC >= 7.2Gravatar David Terei2011-08-03
|
* Improved Unicode support in the light of PEP383Gravatar Max Bolingbroke2011-05-14
|
* Include HsUnix.h earlier in System/Posix/Files.hscGravatar Ian Lynagh2011-03-24
|
* avoid Foreign.unsafePerformIOGravatar Ross Paterson2010-09-09
|
* Fix warnings in the unix packageGravatar Ian Lynagh2008-08-21
|
* move some stuff here from System.Directory, now the dependencies are reversedGravatar Simon Marlow2008-08-21
|
* Avoid using deprecated flagsGravatar Ian Lynagh2008-06-16
|
* Remove incorrect commentGravatar Ian Lynagh2007-10-14
|
* Don't use Fd/FD in foreign declsGravatar Ian Lynagh2007-04-04
| | | | | Using CInt makes it much easier to verify that it is right, and we won't get caught out by possible newtype switches between CInt/Int.
* Fix C/Haskell type mismatchesGravatar Ian Lynagh2007-04-04
|
* Follow type changes in baseGravatar Ian Lynagh2007-04-03
| | | | (of the dubiously exported c_access and c_fcntl_write)
* export the file-type modes, so that createDevice can be usedGravatar Simon Marlow2007-03-05
|
* add C wrappers for lstat() and mknod(). Fixes #1086.Gravatar Simon Marlow2007-02-26
|
* Added more documentation to System.Posix.FilesGravatar Johan Tibell2006-08-13
|
* [project @ 2005-11-10 12:58:32 by simonmar]Gravatar simonmar2005-11-10
| | | | Some docs for System.Posix, from Bj?rn Bringert
* [project @ 2005-05-10 10:40:12 by simonmar]Gravatar simonmar2005-05-10
| | | | PATH_MAX fixes from Thomas Schwinge.
* [project @ 2005-01-06 11:27:48 by ross]Gravatar ross2005-01-06
| | | | c_ftruncate is now in System.Posix.Internals
* [project @ 2004-08-19 11:15:51 by simonmar]Gravatar simonmar2004-08-19
| | | | | | | | | Add filenames to all errors where it makes sense. I've added System.Posix.Error with a new family of error-throwing functions, throwErrnoPath*. This seemed to make the most sense: they don't belong in Foreign.C.Error (C by itself has no notion of paths). Fixes: [ 954378 ] getFileStatus does not include the file name in IO-Error
* [project @ 2003-09-16 13:45:02 by simonmar]Gravatar simonmar2003-09-16
| | | | fileExist should not throw an exception if the file does not exist.
* [project @ 2003-09-15 20:59:07 by dons]Gravatar dons2003-09-15
| | | | | | | | #ifdef's for the _PC_SYNC_IO, _PC_ASYNC_IO, _PC_FILESIZEBITS, _PC_SYMLINK_MAX. These 4 symbols are not universal: FreeBSD and Linux and the only OS's that appear to have them at the moment.
* [project @ 2003-09-12 13:05:20 by simonmar]Gravatar simonmar2003-09-12
| | | | Implement pathconf()/fpathconf() wrappers.
* [project @ 2003-04-11 10:11:23 by ross]Gravatar ross2003-04-11
| | | | rename GHC.Posix as System.Posix.Internals
* [project @ 2002-12-19 13:52:55 by simonmar]Gravatar simonmar2002-12-19
| | | | | | | | | Fill in some more bits in the new Unix library: specifically the contents of PosixTTY and PosixDB (now System.Posix.Terminal and System.Posix.User respectively). We're now about 95% complete w.r.t. the old posix library. I've identified the reminaing bits to do in System/Posix.hs.
* [project @ 2002-11-18 08:37:35 by stolz]Gravatar stolz2002-11-18
| | | | | | readlink(2) does not append a NUL character to buffer. Noticed by: John Meacham <john@repetae.net>
* [project @ 2002-10-08 08:03:02 by wolfgang]Gravatar wolfgang2002-10-08
| | | | | | | | | Make the new Posix bindings compile on Mac OS X. Most notable, Mac OS X lacks *) lchown *) SIGPOLL I don't know of a replacement of either, so they are just left out when they are not detected by configure.
* [project @ 2002-09-12 16:38:21 by simonmar]Gravatar simonmar2002-09-12
| | | | More POSIX bits... we're getting there.
* [project @ 2002-09-06 14:34:15 by simonmar]Gravatar simonmar2002-09-06
Partial rewrite of the POSIX library. The main purpose of this sweep is to remove the last dependencies of the compiler on hslibs. When I've committed the associated compiler changes, only the 'base' package will be required to bootstrap the compiler. Additionally to build GHCi, the 'readline' and 'unix' packages will be required. The new POSIX library lives mostly in libraries/unix, with a few bits required for compiler bootstrapping in libraries/base. The 'base' package is mostly free of hsc2hs code to make bootstrapping from HC files easier, but the 'unix' package will use hsc2hs liberally. The old POSIX library continues to provide more-or-less the same interface as before, although some of the types are more correct now (previously lots of POSIX types were just mapped to Int). The new interface is largely the same as the old, except that some new functionality from the latest POSIX spec has been added (eg. symbolic links). So far, the new POSIX library has signal support, directory/file operations and lots of stuff from unistd.h. The module names are: System.Posix The main dude, exports everything System.Posix.Types All the POSIX types, using the same naming scheme as Foreign.C.Types, Eg. CUid, COff, etc. Many of these types were previously exported by GHC.Posix. Additionally exports the "nicer" names used by the old POSIX library for compatibility (eg. ProcessID == CPid, FileMode == CMode, etc.) All reasonable instances are derived for these types. System.Posix.Signals Signal support, contains most of which was in PosixProcPrim before. The RTS interface to the signal handling support has been rationalised slightly. System.Posix.Directory Directory support, most were in PosixFiles before. System.Posix.Files File operations, most were in PosixFiles before. System.Posix.Unistd (for want of a better name) Miscellaneous bits that mostly come from the unistd.h header file. PosixProcEnv before. The rest of the library should pan out like so: System.Posix.IO System.Posix.Error (maybe) System.Posix.Process System.Posix.Terminal (I've no doubt broken Win32 support, but I'm checking the build at the moment).