public DirectoryInfo GetDocumentsDirectory() { // Looks (once) for a document-directory with one of the names defined in DocumentDirectoryNames. // If an actual directory is found, the field DocumentsDirectory is assigned with it and returned. // If none is found, the field DocumentsDirectory is assigned with a new, non-existing directory // given the name of the first element of DocumentDirectoryNames (should be the most common name). // The method will always return a DirectoryInfo object in which can be checked by it's Exists-field. if (DocumentsDirectory == null) { int index = ArkadeConstants.DocumentDirectoryNames.Length - 1; do { DocumentsDirectory = WorkingDirectory.Content().WithSubDirectory( ArkadeConstants.DocumentDirectoryNames[index--] ).DirectoryInfo(); }while (index >= 0 && !DocumentsDirectory.Exists); } return(DocumentsDirectory); }
private DirectoryInfo DefaultNamedDocumentsDirectory() { return(WorkingDirectory.Content().WithSubDirectory( DocumentDirectoryNames[0] ).DirectoryInfo()); }
public Archive(ArchiveType archiveType, Uuid uuid, WorkingDirectory workingDirectory) { ArchiveType = archiveType; Uuid = uuid; WorkingDirectory = workingDirectory; }
public FileInfo GetInformationPackageFileName() { return(WorkingDirectory.Root().WithFile(Uuid.ToString() + ".tar")); }
public string GetMetadataCatalogXmlSchemaFileName() { return(WorkingDirectory.Content().WithFile(ArkadeConstants.MetadatakatalogXsdFileName).FullName); }
public string GetStructureDescriptionXmlSchemaFileName() { return(WorkingDirectory.Content().WithFile(ArkadeConstants.AddmlXsdFileName).FullName); }
public string GetStructureDescriptionFileName() { return(WorkingDirectory.AdministrativeMetadata().WithFile(ArkadeConstants.AddmlXmlFileName).FullName); }
public string GetContentDescriptionFileName() { return(WorkingDirectory.Content().WithFile(ArkadeConstants.ArkivstrukturXmlFileName).FullName); }
public FileInfo GetInfoXmlFileName() { return(WorkingDirectory.Root().WithFile(Uuid + ".xml")); }