Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="IsolatedStorageFileStream"/> class giving access to the file designated by path,
        /// in the specified mode, with the specified file access, using the file sharing mode specified by share,
        /// and in the context of the <see cref="IsolatedStorageFile"/> specified by isf.
        /// </summary>
        /// <param name="path">The relative path of the file within isolated storage.</param>
        /// <param name="mode">One of the <see cref="FileMode"/> values.</param>
        /// <param name="access">A bitwise combination of the <see cref="FileAccess"/> values.</param>
        /// <param name="share">A bitwise combination of the <see cref="FileShare"/> values.</param>
        /// <param name="isf">The <see cref="IsolatedStorageFile"/> in which to open the <see cref="IsolatedStorageFileStream"/>.</param>
        public IsolatedStorageFileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access,
                                         System.IO.FileShare share, IsolatedStorage.IsolatedStorageFile isf)
            : base(Path.Combine(isf.BasePath, path), mode, access, share)
        {
            //also set the hidden attribute (just in case)
            System.IO.FileInfo fi = new System.IO.FileInfo(System.IO.Path.Combine(isf.BasePath, path));
            fi.Attributes |= System.IO.FileAttributes.Hidden;

            _isolatedStorageFile = isf;
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IsolatedStorageFileStream"/> class giving access to the file designated by path in the specified mode, with the specified file access, and in the context of the <see cref="IsolatedStorageFile"/> specified by isf.
 /// </summary>
 /// <param name="path">The relative path of the file within isolated storage.</param>
 /// <param name="mode">One of the <see cref="FileMode"/> values.</param>
 /// <param name="access">A bitwise combination of the <see cref="FileAccess"/> values.</param>
 /// <param name="isf">The <see cref="IsolatedStorageFile"/> in which to open the <see cref="IsolatedStorageFileStream"/>.</param>
 public IsolatedStorageFileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access,
                                  IsolatedStorage.IsolatedStorageFile isf) : this(path, mode, access, FileShare.None, isf)
 {
 }