Jypeli  9
The simple game programming library
Directories.cs
Siirry tämän tiedoston dokumentaatioon.
1 using System.Collections.Generic;
2 
3 namespace Jypeli
4 {
5  public partial class FileManager
6  {
7  private Stack<string> prevDirs = new Stack<string>();
8  protected string _currentDir;
9 
13  public string CurrentDirectory
14  {
15  get { return _currentDir; }
16  set { ChDir( value ); }
17  }
18 
24  public abstract bool ChDir( string path );
25 
30  public abstract void MkDir( string path );
31 
36  public abstract void RmDir( string path );
37 
43  public void PushDir( string dir )
44  {
45  prevDirs.Push( _currentDir );
46  ChDir( dir );
47  }
48 
53  public void PopDir()
54  {
55  if ( prevDirs.Count > 0 )
56  _currentDir = prevDirs.Pop();
57  }
58  }
59 }
Jypeli
Definition: Automobile.cs:5
Jypeli.FileManager.prevDirs
Stack< string > prevDirs
Definition: Directories.cs:7
Jypeli.FileManager.PopDir
void PopDir()
Palauttaa edellisen työhakemiston. Jos edellistä työhakemistoa ei ole tallennettu,...
Definition: Directories.cs:53
Jypeli.FileManager.MkDir
abstract void MkDir(string path)
Luo uuden hakemiston.
System
Definition: CFFauxAttributes.cs:29
Jypeli.FileManager.ChDir
abstract bool ChDir(string path)
Vaihtaa nykyistä hakemistoa.
Jypeli.FileManager.PushDir
void PushDir(string dir)
Vaihtaa työhakemistoa jättäen edellisen hakemiston muistiin. Kutsu PopDir kun haluat palauttaa työhak...
Definition: Directories.cs:43
Jypeli.FileManager._currentDir
string _currentDir
Definition: Directories.cs:8
Jypeli.FileManager.CurrentDirectory
string CurrentDirectory
Nykyinen työhakemisto.
Definition: Directories.cs:14
Jypeli.FileManager.RmDir
abstract void RmDir(string path)
Poistaa hakemiston.