DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Private Member Functions | List of all members
Deveel.Data.Store.LocalFileSystem Class Reference
Inheritance diagram for Deveel.Data.Store.LocalFileSystem:
Deveel.Data.Store.IFileSystem

Public Member Functions

bool FileExists (string path)
 
LocalFile OpenFile (string fileName, bool readOnly)
 
LocalFile CreateFile (string fileName)
 
bool DeleteFile (string path)
 
string CombinePath (string path1, string path2)
 
bool RenameFile (string sourcePath, string destPath)
 
bool DirectoryExists (string path)
 
void CreateDirectory (string path)
 
long GetFileSize (string path)
 

Private Member Functions

IFile IFileSystem. OpenFile (string path, bool readOnly)
 
IFile IFileSystem. CreateFile (string path)
 

Detailed Description

Definition at line 21 of file LocalFileSystem.cs.

Member Function Documentation

string Deveel.Data.Store.LocalFileSystem.CombinePath ( string  path1,
string  path2 
)
inline

Implements Deveel.Data.Store.IFileSystem.

Definition at line 56 of file LocalFileSystem.cs.

56  {
57  return Path.Combine(path1, path2);
58  }
void Deveel.Data.Store.LocalFileSystem.CreateDirectory ( string  path)
inline

Implements Deveel.Data.Store.IFileSystem.

Definition at line 69 of file LocalFileSystem.cs.

69  {
70  Directory.CreateDirectory(path);
71  }
IFile IFileSystem. Deveel.Data.Store.LocalFileSystem.CreateFile ( string  path)
inlineprivate

Implements Deveel.Data.Store.IFileSystem.

Definition at line 37 of file LocalFileSystem.cs.

37  {
38  return CreateFile(path);
39  }
IFile IFileSystem. CreateFile(string path)
LocalFile Deveel.Data.Store.LocalFileSystem.CreateFile ( string  fileName)
inline

Implements Deveel.Data.Store.IFileSystem.

Definition at line 41 of file LocalFileSystem.cs.

41  {
42  if (String.IsNullOrEmpty(fileName))
43  throw new ArgumentNullException("fileName");
44 
45  if (FileExists(fileName))
46  throw new IOException(string.Format("The file '{0}' already exists: cannot create.", fileName));
47 
48  return new LocalFile(fileName, false);
49  }
A long string in the system.
bool Deveel.Data.Store.LocalFileSystem.DeleteFile ( string  path)
inline

Implements Deveel.Data.Store.IFileSystem.

Definition at line 51 of file LocalFileSystem.cs.

51  {
52  File.Delete(path);
53  return FileExists(path);
54  }
bool Deveel.Data.Store.LocalFileSystem.DirectoryExists ( string  path)
inline

Implements Deveel.Data.Store.IFileSystem.

Definition at line 65 of file LocalFileSystem.cs.

65  {
66  return Directory.Exists(path);
67  }
bool Deveel.Data.Store.LocalFileSystem.FileExists ( string  path)
inline

Implements Deveel.Data.Store.IFileSystem.

Definition at line 22 of file LocalFileSystem.cs.

22  {
23  return File.Exists(path);
24  }
long Deveel.Data.Store.LocalFileSystem.GetFileSize ( string  path)
inline

Implements Deveel.Data.Store.IFileSystem.

Definition at line 73 of file LocalFileSystem.cs.

73  {
74  return new FileInfo(path).Length;
75  }
IFile IFileSystem. Deveel.Data.Store.LocalFileSystem.OpenFile ( string  path,
bool  readOnly 
)
inlineprivate

Implements Deveel.Data.Store.IFileSystem.

Definition at line 26 of file LocalFileSystem.cs.

26  {
27  return OpenFile(path, readOnly);
28  }
IFile IFileSystem. OpenFile(string path, bool readOnly)
LocalFile Deveel.Data.Store.LocalFileSystem.OpenFile ( string  fileName,
bool  readOnly 
)
inline

Implements Deveel.Data.Store.IFileSystem.

Definition at line 30 of file LocalFileSystem.cs.

30  {
31  if (!FileExists(fileName))
32  throw new IOException(string.Format("The file '{0}' does not exist: cannot be opened", fileName));
33 
34  return new LocalFile(fileName, readOnly);
35  }
bool Deveel.Data.Store.LocalFileSystem.RenameFile ( string  sourcePath,
string  destPath 
)
inline

Implements Deveel.Data.Store.IFileSystem.

Definition at line 60 of file LocalFileSystem.cs.

60  {
61  File.Move(sourcePath, destPath);
62  return File.Exists(destPath);
63  }

The documentation for this class was generated from the following file: