public static void Build() { if (s_RootPath == null) { s_RootPath = Path.Combine(Environment.CurrentDirectory, "Database"); } DirectoryIO.DeleteAllContents(s_RootPath); // Unpack the sample database ZipFile.ExtractToDirectory("SampleDatabase.zip", s_RootPath); // XForm add each source foreach (string filePath in Directory.GetFiles(Path.Combine(s_RootPath, "_Raw"))) { Add(filePath); } foreach (string folderPath in Directory.GetDirectories(Path.Combine(s_RootPath, "_Raw"))) { Add(folderPath); } // Add the sample configs and queries DirectoryIO.Copy(Path.Combine(Environment.CurrentDirectory, "SampleDatabase"), s_RootPath); }
public Program(string dataFolderPath) { this.dataFolderPath = dataFolderPath; this.houseFlipperExe = Path.Combine(DirectoryIO.GetProjectDir(), @"..\..\HouseFlipper\bin\debug\HouseFlipper.exe"); if (!File.Exists(houseFlipperExe)) { throw new InvalidOperationException(string.Format("Error: Path does not exist '{0}'", houseFlipperExe)); } }
public DirectoryScannerActor(DirectoryIO io, IActorRef fileReceiverActor) { foreach( var m in io.GetExistingFiles().Select(x => new ProcessFile(x))) fileReceiverActor.Tell(m); fileObserver = new FileObserver(Self,fileReceiverActor); //throw new Exception("dfasbasdbjkdasj"); Receive<Exception>(x => throwUp(x)); }
private void button1_Click(object sender, EventArgs e) { if (FormMode == 1) { string path = Environment.CurrentDirectory; DirectoryIO.CopyFolder(path + "\\data\\sys\\", path + "\\data\\" + textBox1.Text.Trim() + "\\"); MessageBox.Show(textBox1.Text.Trim() + "创建成功,请重新打开看门狗桌面启动助手!"); } else if (FormMode == 2) { string path = Environment.CurrentDirectory; Directory.Move(path + "\\data\\" + ProjectName + "\\", path + "\\data\\" + textBox1.Text.Trim() + "\\"); MessageBox.Show(textBox1.Text.Trim() + "修改成功,请重新打开看门狗桌面启动助手!"); } }
public static Props Create(DirectoryIO io, IActorRef fileReceiverActor) { return Props.Create(() => new DirectoryScannerActor(io, fileReceiverActor)); }
public Demo() { this.ExecutablePath = Path.Combine(DirectoryIO.GetProjectDir(), @"..\..\KazmonWatcher\bin\debug\KazmonWatcher.exe"); }
public void Delete(string logicalPath) { DirectoryIO.DeleteAll(PathCombineSandbox(logicalPath)); }
static DataFolderFactory() { fooPath = Path.Combine(DirectoryIO.GetProjectDir(), "foo"); quotedFooPath = "\"" + fooPath + "\""; barPath = Path.Combine(fooPath, "bar.csv"); }