public final class IsolatedStorageFile
extends java.lang.Object
Constructor and Description |
---|
IsolatedStorageFile() |
Modifier and Type | Method and Description |
---|---|
void |
Close()
Closes a store previously opened with System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(System.IO.IsolatedStorage.IsolatedStorageScope,System.Type,System.Type), System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForAssembly(), or System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForDomain().
|
void |
CopyFile(java.lang.String sourceFileName,
java.lang.String destinationFileName,
boolean overwrite)
Copies an existing file to a new file, and optionally overwrites an existing file.
|
void |
CreateDirectory(java.lang.String dir) |
IsolatedStorageFileStream |
CreateFile(java.lang.String path) |
void |
DeleteFile(java.lang.String file)
Deletes a file in the isolated store.
|
boolean |
FileExists(java.lang.String path) |
protected void |
finalize() |
static IsolatedStorageFile |
GetUserStoreForApplication()
Obtains user-scoped isolated storage corresponding to the calling code's application identity.
|
void |
MoveDirectory(java.lang.String sourceDirectoryName,
java.lang.String destinationDirectoryName)
Moves a specified directory and its contents to a new location.
|
void |
MoveFile(java.lang.String sourceFileName,
java.lang.String destinationFileName)
Moves a specified file to a new location, and optionally lets you specify a new file name.
|
IsolatedStorageFileStream |
OpenFile(java.lang.String path,
FileMode mode) |
void |
Remove()
Removes the isolated storage scope and all its contents.
|
protected void finalize()
finalize
in class java.lang.Object
public void Close()
public void CreateDirectory(java.lang.String dir)
dir
- public IsolatedStorageFileStream CreateFile(java.lang.String path)
path
- public void DeleteFile(java.lang.String file)
file
- The relative path of the file to delete within the isolated store.IsolatedStorageException
- The store has been removed.-or-Unable to delete the file. -or-Isolated storage is disabled.ArgumentException
- file is badly formed.ArgumentNullException
- file is null.ObjectDisposedException
- The store has been disposed.public boolean FileExists(java.lang.String path)
path
- public void CopyFile(java.lang.String sourceFileName, java.lang.String destinationFileName, boolean overwrite)
sourceFileName
- The name of the file to copy.destinationFileName
- The name of the destination file. This cannot be a directory.overwrite
- true if the destination file can be overwritten; otherwise, false.ArgumentException
- sourceFileName or destinationFileName is a zero-length string, contains only white space, or contains one or more invalid characters defined by the System.IO.Path.GetInvalidPathChars() method.ArgumentNullException
- sourceFileName or destinationFileName is null.InvalidOperationException
- The isolated store has been closed.public static IsolatedStorageFile GetUserStoreForApplication()
public void MoveDirectory(java.lang.String sourceDirectoryName, java.lang.String destinationDirectoryName)
sourceDirectoryName
- The name of the directory to move.destinationDirectoryName
- The path to the new location for sourceDirectoryName. This cannot be the path to an existing directory.ArgumentException
- sourceFileName or destinationFileName is a zero-length string, contains only white space, or contains one or more invalid characters defined by the System.IO.Path.GetInvalidPathChars() method.ArgumentNullException
- sourceFileName or destinationFileName is null.InvalidOperationException
- The isolated store has been closed.ObjectDisposedException
- The isolated store has been disposed.System.DirectoryNotFoundException
- sourceDirectoryName does not exist.public void MoveFile(java.lang.String sourceFileName, java.lang.String destinationFileName)
sourceFileName
- The name of the file to move.destinationFileName
- The path to the new location for the file. If a file name is included, the moved file will have that name.public IsolatedStorageFileStream OpenFile(java.lang.String path, FileMode mode)
path
- mode
- public void Remove()
IsolatedStorageException
- The isolated store cannot be deleted.