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

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

Issue 901513002: Change Mac OS to OS X in dart:io dartdoc (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/io/file_system_entity.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 modes in which a File can be opened. 8 * The modes in which a File can be opened.
9 */ 9 */
10 class FileMode { 10 class FileMode {
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 * specified, the full file is locked, If only `start` is specified 722 * specified, the full file is locked, If only `start` is specified
723 * the file is locked from byte position `start` to the end of the 723 * the file is locked from byte position `start` to the end of the
724 * file, no matter how large it grows. It is possible to specify an 724 * file, no matter how large it grows. It is possible to specify an
725 * explicit value of `end` which is past the current length of the file. 725 * explicit value of `end` which is past the current length of the file.
726 * 726 *
727 * To obtain an exclusive lock on a file it must be opened for writing. 727 * To obtain an exclusive lock on a file it must be opened for writing.
728 * 728 *
729 * *NOTE* file locking does have slight differences in behavior across 729 * *NOTE* file locking does have slight differences in behavior across
730 * platforms: 730 * platforms:
731 * 731 *
732 * On Linux and Mac OS this uses advisory locks, which have the 732 * On Linux and OS X this uses advisory locks, which have the
733 * surprising semantics that all locks associated with a given file 733 * surprising semantics that all locks associated with a given file
734 * are removed when *any* file descriptor for that file is closed by 734 * are removed when *any* file descriptor for that file is closed by
735 * the process. Note that this does not actually lock the file for 735 * the process. Note that this does not actually lock the file for
736 * access. Also note that advisory locks are on a process 736 * access. Also note that advisory locks are on a process
737 * level. This means that several isolates in the same process can 737 * level. This means that several isolates in the same process can
738 * obtain an exclusive lock on the same file. 738 * obtain an exclusive lock on the same file.
739 * 739 *
740 * On Windows the regions used for lock and unlock needs to match. If that 740 * On Windows the regions used for lock and unlock needs to match. If that
741 * is not the case unlocking will result in the OS error "The segment is 741 * is not the case unlocking will result in the OS error "The segment is
742 * already unlocked". 742 * already unlocked".
(...skipping 12 matching lines...) Expand all
755 * specified, the full file is locked, If only `start` is specified 755 * specified, the full file is locked, If only `start` is specified
756 * the file is locked from byte position `start` to the end of the 756 * the file is locked from byte position `start` to the end of the
757 * file, no matter how large it grows. It is possible to specify an 757 * file, no matter how large it grows. It is possible to specify an
758 * explicit value of `end` which is past the current length of the file. 758 * explicit value of `end` which is past the current length of the file.
759 * 759 *
760 * To obtain an exclusive lock on a file it must be opened for writing. 760 * To obtain an exclusive lock on a file it must be opened for writing.
761 * 761 *
762 * *NOTE* file locking does have slight differences in behavior across 762 * *NOTE* file locking does have slight differences in behavior across
763 * platforms: 763 * platforms:
764 * 764 *
765 * On Linux and Mac OS this uses advisory locks, which have the 765 * On Linux and OS X this uses advisory locks, which have the
766 * surprising semantics that all locks associated with a given file 766 * surprising semantics that all locks associated with a given file
767 * are removed when *any* file descriptor for that file is closed by 767 * are removed when *any* file descriptor for that file is closed by
768 * the process. Note that this does not actually lock the file for 768 * the process. Note that this does not actually lock the file for
769 * access. Also note that advisory locks are on a process 769 * access. Also note that advisory locks are on a process
770 * level. This means that several isolates in the same process can 770 * level. This means that several isolates in the same process can
771 * obtain an exclusive lock on the same file. 771 * obtain an exclusive lock on the same file.
772 * 772 *
773 * On Windows the regions used for lock and unlock needs to match. If that 773 * On Windows the regions used for lock and unlock needs to match. If that
774 * is not the case unlocking will result in the OS error "The segment is 774 * is not the case unlocking will result in the OS error "The segment is
775 * already unlocked". 775 * already unlocked".
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 sb.write(": $osError"); 866 sb.write(": $osError");
867 if (path != null) { 867 if (path != null) {
868 sb.write(", path = '$path'"); 868 sb.write(", path = '$path'");
869 } 869 }
870 } else if (path != null) { 870 } else if (path != null) {
871 sb.write(": $path"); 871 sb.write(": $path");
872 } 872 }
873 return sb.toString(); 873 return sb.toString();
874 } 874 }
875 } 875 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/file_system_entity.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698