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

Side by Side Diff: sdk/lib/io/file_system_entity.dart

Issue 2681683005: [dart:io] Adds functions to set file access and modification time (Closed)
Patch Set: Update changelog Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « sdk/lib/io/file_impl.dart ('k') | sdk/lib/io/io_service.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * The type of an entity on the file system, such as a file, directory, or link. 8 * The type of an entity on the file system, such as a file, directory, or link.
9 * 9 *
10 * These constants are used by the [FileSystemEntity] class 10 * These constants are used by the [FileSystemEntity] class
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 * Calls the operating system's stat() function on the [path] of this 352 * Calls the operating system's stat() function on the [path] of this
353 * [FileSystemEntity]. Identical to [:FileStat.stat(this.path):]. 353 * [FileSystemEntity]. Identical to [:FileStat.stat(this.path):].
354 * 354 *
355 * Returns a [:Future<FileStat>:] object containing the data returned by 355 * Returns a [:Future<FileStat>:] object containing the data returned by
356 * stat(). 356 * stat().
357 * 357 *
358 * If the call fails, completes the future with a [FileStat] object 358 * If the call fails, completes the future with a [FileStat] object
359 * with .type set to 359 * with .type set to
360 * FileSystemEntityType.NOT_FOUND and the other fields invalid. 360 * FileSystemEntityType.NOT_FOUND and the other fields invalid.
361 */ 361 */
362 Future<FileStat> stat(); 362 Future<FileStat> stat() => FileStat.stat(path);
363 363
364 /** 364 /**
365 * Synchronously calls the operating system's stat() function on the 365 * Synchronously calls the operating system's stat() function on the
366 * [path] of this [FileSystemEntity]. 366 * [path] of this [FileSystemEntity].
367 * Identical to [:FileStat.statSync(this.path):]. 367 * Identical to [:FileStat.statSync(this.path):].
368 * 368 *
369 * Returns a [FileStat] object containing the data returned by stat(). 369 * Returns a [FileStat] object containing the data returned by stat().
370 * 370 *
371 * If the call fails, returns a [FileStat] object with .type set to 371 * If the call fails, returns a [FileStat] object with .type set to
372 * FileSystemEntityType.NOT_FOUND and the other fields invalid. 372 * FileSystemEntityType.NOT_FOUND and the other fields invalid.
373 */ 373 */
374 FileStat statSync(); 374 FileStat statSync() => FileStat.statSync(path);
375 375
376 /** 376 /**
377 * Deletes this [FileSystemEntity]. 377 * Deletes this [FileSystemEntity].
378 * 378 *
379 * If the [FileSystemEntity] is a directory, and if [recursive] is false, 379 * If the [FileSystemEntity] is a directory, and if [recursive] is false,
380 * the directory must be empty. Otherwise, if [recursive] is true, the 380 * the directory must be empty. Otherwise, if [recursive] is true, the
381 * directory and all sub-directories and files in the directories are 381 * directory and all sub-directories and files in the directories are
382 * deleted. Links are not followed when deleting recursively. Only the link 382 * deleted. Links are not followed when deleting recursively. Only the link
383 * is deleted, not its target. 383 * is deleted, not its target.
384 * 384 *
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 return buffer.toString(); 831 return buffer.toString();
832 } 832 }
833 } 833 }
834 834
835 835
836 class _FileSystemWatcher { 836 class _FileSystemWatcher {
837 external static Stream<FileSystemEvent> _watch( 837 external static Stream<FileSystemEvent> _watch(
838 String path, int events, bool recursive); 838 String path, int events, bool recursive);
839 external static bool get isSupported; 839 external static bool get isSupported;
840 } 840 }
OLDNEW
« no previous file with comments | « sdk/lib/io/file_impl.dart ('k') | sdk/lib/io/io_service.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698