Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Unified Diff: runtime/bin/file.h

Issue 12533008: dart:io | Add FileSystemEntity.typeSync to test for symbolic links. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add error-checking for arguments. Disable Windows implementation. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/file.h
diff --git a/runtime/bin/file.h b/runtime/bin/file.h
index 05be61c51da9924220fb419bca2a58ef9373043e..9d6be4393d5cd10e0644a645c05e47c122cf4a18 100644
--- a/runtime/bin/file.h
+++ b/runtime/bin/file.h
@@ -36,6 +36,13 @@ class File {
kDartAppend = 2
};
+ enum Type {
+ kIsFile = 0,
+ kIsDirectory = 1,
+ kIsLink = 2,
+ kDoesNotExist = 3
+ };
+
enum StdioHandleType {
kTerminal = 0,
kPipe = 1,
@@ -124,6 +131,7 @@ class File {
static char* GetContainingDirectory(char* path);
static const char* PathSeparator();
static const char* StringEscapedPathSeparator();
+ static Type GetType(const char* path, bool follow_links);
static StdioHandleType GetStdioHandleType(int fd);
static FileOpenMode DartModeToFileMode(DartFileOpenMode mode);
« no previous file with comments | « runtime/bin/builtin_natives.cc ('k') | runtime/bin/file.cc » ('j') | runtime/bin/file_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698