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

Unified Diff: sdk/lib/io/file_system_entity.dart

Issue 124753002: Code cleanup (mostly io lib and some http lib). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. Created 6 years, 11 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: sdk/lib/io/file_system_entity.dart
diff --git a/sdk/lib/io/file_system_entity.dart b/sdk/lib/io/file_system_entity.dart
index 0a8d230d601bdbc76130ac1965163003c182e31f..af28044defe6b3c6dc0e4dec6cbfe7993c268550 100644
--- a/sdk/lib/io/file_system_entity.dart
+++ b/sdk/lib/io/file_system_entity.dart
@@ -13,12 +13,12 @@ class FileSystemEntityType {
FileSystemEntityType.DIRECTORY,
FileSystemEntityType.LINK,
FileSystemEntityType.NOT_FOUND];
- const FileSystemEntityType._internal(int this._type);
+ final int _type;
+
+ const FileSystemEntityType._internal(this._type);
static FileSystemEntityType _lookup(int type) => _typeList[type];
String toString() => const ['FILE', 'DIRECTORY', 'LINK', 'NOT_FOUND'][_type];
-
- final int _type;
}
/**
@@ -35,6 +35,37 @@ class FileStat {
static const _MODE = 4;
static const _SIZE = 5;
+ /**
+ * The time of the last change to the data or metadata of the file system
+ * object. On Windows platforms, this is instead the file creation time.
+ */
+ final DateTime changed;
+ /**
+ * The time of the last change to the data of the file system
+ * object.
+ */
+ final DateTime modified;
+ /**
+ * The time of the last access to the data of the file system
+ * object. On Windows platforms, this may have 1 day granularity, and be
+ * out of date by an hour.
+ */
+ final DateTime accessed;
+ /**
+ * The type of the object (file, directory, or link). If the call to
+ * stat() fails, the type of the returned object is NOT_FOUND.
+ */
+ final FileSystemEntityType type;
+ /**
+ * The mode of the file system object. Permissions are encoded in the lower
+ * 16 bits of this number, and can be decoded using the [modeString] getter.
+ */
+ final int mode;
+ /**
+ * The size of the file system object.
+ */
+ final int size;
+
FileStat._internal(this.changed,
this.modified,
this.accessed,
@@ -111,42 +142,12 @@ FileStat: type $type
if ((permissions & 0x800) != 0) result.add("(suid) ");
if ((permissions & 0x400) != 0) result.add("(guid) ");
if ((permissions & 0x200) != 0) result.add("(sticky) ");
- result.add(codes[(permissions >> 6) & 0x7]);
- result.add(codes[(permissions >> 3) & 0x7]);
- result.add(codes[permissions & 0x7]);
+ result
+ ..add(codes[(permissions >> 6) & 0x7])
+ ..add(codes[(permissions >> 3) & 0x7])
+ ..add(codes[permissions & 0x7]);
return result.join();
}
-
- /**
- * The time of the last change to the data or metadata of the file system
- * object. On Windows platforms, this is instead the file creation time.
- */
- final DateTime changed;
- /**
- * The time of the last change to the data of the file system
- * object.
- */
- final DateTime modified;
- /**
- * The time of the last access to the data of the file system
- * object. On Windows platforms, this may have 1 day granularity, and be
- * out of date by an hour.
- */
- final DateTime accessed;
- /**
- * The type of the object (file, directory, or link). If the call to
- * stat() fails, the type of the returned object is NOT_FOUND.
- */
- final FileSystemEntityType type;
- /**
- * The mode of the file system object. Permissions are encoded in the lower
- * 16 bits of this number, and can be decoded using the [modeString] getter.
- */
- final int mode;
- /**
- * The size of the file system object.
- */
- final int size;
}
« no previous file with comments | « sdk/lib/io/file_impl.dart ('k') | sdk/lib/io/http.dart » ('j') | sdk/lib/io/http_date.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698