Example #1
0
        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);
        }
Example #2
0
 private DirectoryInfo DefaultNamedDocumentsDirectory()
 {
     return(WorkingDirectory.Content().WithSubDirectory(
                DocumentDirectoryNames[0]
                ).DirectoryInfo());
 }
Example #3
0
 public Archive(ArchiveType archiveType, Uuid uuid, WorkingDirectory workingDirectory)
 {
     ArchiveType      = archiveType;
     Uuid             = uuid;
     WorkingDirectory = workingDirectory;
 }
Example #4
0
 public FileInfo GetInformationPackageFileName()
 {
     return(WorkingDirectory.Root().WithFile(Uuid.ToString() + ".tar"));
 }
Example #5
0
 public string GetMetadataCatalogXmlSchemaFileName()
 {
     return(WorkingDirectory.Content().WithFile(ArkadeConstants.MetadatakatalogXsdFileName).FullName);
 }
Example #6
0
 public string GetStructureDescriptionXmlSchemaFileName()
 {
     return(WorkingDirectory.Content().WithFile(ArkadeConstants.AddmlXsdFileName).FullName);
 }
Example #7
0
 public string GetStructureDescriptionFileName()
 {
     return(WorkingDirectory.AdministrativeMetadata().WithFile(ArkadeConstants.AddmlXmlFileName).FullName);
 }
Example #8
0
 public string GetContentDescriptionFileName()
 {
     return(WorkingDirectory.Content().WithFile(ArkadeConstants.ArkivstrukturXmlFileName).FullName);
 }
Example #9
0
 public FileInfo GetInfoXmlFileName()
 {
     return(WorkingDirectory.Root().WithFile(Uuid + ".xml"));
 }