Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
OpenFile Method (String, FileMode, FileAccess, FileShare)

StorageContainer.OpenFile Method (String, FileMode, FileAccess, FileShare)

Opens a file in the StorageContainer in the designated mode with the specified read/write access and sharing permission.

Namespace: Microsoft.Xna.Framework.Storage
Assembly: Microsoft.Xna.Framework.Storage (in microsoft.xna.framework.storage.dll)

public Stream OpenFile (
         string file,
         FileMode fileMode,
         FileAccess fileAccess,
         FileShare fileShare
)

Parameters

file
Type: String
Relative path of the file within the StorageContainer.
fileMode
Type: FileMode
One of the enumeration values that specifies how to open the file.
fileAccess
Type: FileAccess
One of the enumeration values that specifies whether the file is opened with read, write, or read/write access.
fileShare
Type: FileShare
A bitwise combination of enumeration values that specify the type of access other Stream objects have to this file.

Return Value

A file opened in the designated mode with the specified access and sharing options.

Xbox 360, Windows 7, Windows Vista, Windows XP

Community Additions

ADD
Show:
© 2015 Microsoft