Nick Kledzik
d4f7f6f97a
Add permissions(), map_file_pages(), and unmap_file_pages() to llvm::sys::fs and add unit test. Unix is implemented. Windows side needs to be implemented.
...
llvm-svn: 158770
2012-06-20 00:28:54 +00:00
Daniel Dunbar
35f13a8fee
[Support] Add a version of sys::fs::equivalent() that treats errors as false.
...
llvm-svn: 156864
2012-05-15 22:07:14 +00:00
Eric Christopher
c2a56d46fc
Allow unique_file to take a mode for file permissions, but default
...
to user only read/write.
Part of rdar://11325849
llvm-svn: 156591
2012-05-11 00:07:44 +00:00
Sylvestre Ledru
3e90fea8d3
Conflict with st_dev/st_ino identifiers under Debian GNU/Hurd
...
The problem is that the struct file_status on UNIX systems has two
members called st_dev and st_ino; those are also members of the
struct stat, and they are reserved identifiers which can also be
provided as #define (and this is the case for st_dev on Hurd).
The solution (attached) is to rename them, for example adding a
"fs_" prefix (= file status) to them.
Patch by Pino Toscano
llvm-svn: 155354
2012-04-23 16:37:23 +00:00
Eli Friedman
8a99f9655e
Zap unnecessary semicolons.
...
llvm-svn: 146682
2011-12-15 21:11:38 +00:00
Michael J. Spencer
5cf93fd736
Support/FileSystem: Add file_magic and move a vew clients over to it.
...
llvm-svn: 146523
2011-12-13 23:17:12 +00:00
Chad Rosier
dc87aebd3c
Revert r146363 to allow buildbots to make forward progress.
...
Original commit message:
Support/FileSystem: Implement canonicalize.
llvm-svn: 146378
2011-12-12 17:58:31 +00:00
Michael J. Spencer
b6d86d4978
Support/FileSystem: Implement bool equivalent(file_status A, file_status B);
...
llvm-svn: 146364
2011-12-12 06:04:28 +00:00
Michael J. Spencer
fd161c5276
Support/FileSystem: Implement canonicalize.
...
llvm-svn: 146363
2011-12-12 06:04:01 +00:00
Michael J. Spencer
d85f1f84f3
Support/FileSystem: Implement recursive_directory_iterator and make
...
directory_iterator preserve InputIterator semantics on copy.
llvm-svn: 146200
2011-12-08 22:50:09 +00:00
Michael J. Spencer
7a13bd426f
PathV2: Add simplified version of exists that returns false on error.
...
llvm-svn: 141450
2011-10-08 00:18:12 +00:00
Benjamin Kramer
2c621d55f6
Remove unimplemented function prototypes from PathV2. They can be readded when someone cares enough.
...
Patch by Aaron Ballman!
llvm-svn: 139682
2011-09-14 01:14:36 +00:00
Argyrios Kyrtzidis
a95f22ea2b
Add an optional 'bool makeAbsolute' in llvm::sys::fs::unique_file function.
...
If true and 'model' parameter is not an absolute path, a temp directory will be prepended.
Make it true by default to match current behaviour.
llvm-svn: 136310
2011-07-28 00:29:20 +00:00
Dan Gohman
c6cda9defe
Change directory_entry::path() to return a const std::string & instead of
...
a StringRef, for the benefit of clients that want the result as a
nul-terminated string. Clients that expect a StringRef will get one via
the implicit conversion.
llvm-svn: 126784
2011-03-01 22:07:09 +00:00
Michael J. Spencer
e1defa51ae
Support/PathV2: Add identify_magic.
...
llvm-svn: 123548
2011-01-15 20:39:36 +00:00
Michael J. Spencer
78fc0cacd0
Support/PathV2: Implement get_magic.
...
llvm-svn: 123544
2011-01-15 18:52:33 +00:00
Michael J. Spencer
018595cf3a
Support/PathV2: Implement has_magic.
...
llvm-svn: 122587
2010-12-28 01:49:01 +00:00
Benjamin Kramer
89db30db3a
Pass StringRefs by value, for consistency.
...
llvm-svn: 122074
2010-12-17 18:19:06 +00:00
Michael J. Spencer
1d95a8f9bc
Support/FileSystem: Change file_status predicate functions that cannot fail to
...
return their result instead of an error_code. Also add some missing predicate
functions.
llvm-svn: 121380
2010-12-09 17:37:02 +00:00
Michael J. Spencer
7c3efd63d4
Support/PathV2: Move make_absolute from path to fs.
...
llvm-svn: 121108
2010-12-07 03:57:17 +00:00
Michael J. Spencer
898af0f235
Support/PathV2: Move current_path from path to fs and fix the Unix implementation.
...
Unix bug spotted by Dan Gohman.
llvm-svn: 121090
2010-12-07 01:22:31 +00:00
Frits van Bommel
f7368778bc
Fix clang warning: "extra ';' inside a class [-pedantic]".
...
llvm-svn: 120998
2010-12-06 10:48:11 +00:00
Michael J. Spencer
244b426701
Support/FileSystem: Add directory_iterator implementation.
...
llvm-svn: 120989
2010-12-06 04:28:42 +00:00
Michael J. Spencer
5a2272dcef
Support/FileSystem: Add status implementation.
...
llvm-svn: 120870
2010-12-04 00:32:40 +00:00
Michael J. Spencer
4e1623c715
Support/FileSystem: Add unique_file and exists implementations.
...
llvm-svn: 120776
2010-12-03 01:21:28 +00:00
Michael J. Spencer
15c61ef434
Support/FileSystem: Remove temp_directory_path.
...
llvm-svn: 120775
2010-12-03 01:21:04 +00:00
Michael J. Spencer
de6ce43320
Support/PathV2: Split PathV2.h into PathV2.h and FileSystem.h.
...
llvm-svn: 120592
2010-12-01 19:31:48 +00:00