示例#1
0
        public void Initialize()
        {
            // ------ SYSTEM -------------------------------------------------------------------------------
            // TOP LEVEL
            DirectoryInfo logs     = Directory.CreateDirectory(Paths.LogPath);
            DirectoryInfo data     = Directory.CreateDirectory(Paths.DataPath);
            DirectoryInfo saves    = Directory.CreateDirectory(Paths.SavePath);
            DirectoryInfo profiles = Directory.CreateDirectory(Paths.ProfilePath);

            // SAVES
            DirectoryInfo cacheSave  = Directory.CreateDirectory(Paths.CacheSavePath);
            DirectoryInfo localSaves = Directory.CreateDirectory(Paths.LocalSavePath);

            // ------ GODOT --------------------------------------------------------------------------------
            Godot.Directory dir = new Godot.Directory();

            //CONTENT
            if (!dir.DirExists(Paths.DefaultLangContentPath))
            {
                dir.MakeDir(Paths.DefaultLangContentPath);
            }
            if (!dir.DirExists(Paths.DefaultContentPath))
            {
                dir.MakeDir(Paths.DefaultContentPath);
            }
        }
示例#2
0
        private static bool CreateHistoryDirectoryIfNotExists(string FileDir)
        {
            Directory Dir = new Directory();

            if (!Dir.DirExists(FileDir))
            {
                return(Dir.MakeDirRecursive(FileDir) == GDError.Ok);
            }

            return(true);
        }
示例#3
0
        public FileEnumerator(
            [NotNull] string path, bool skipNavigational = false, bool skipHidden = false)
        {
            Ensure.String.IsNotNullOrWhiteSpace(path, nameof(path));

            _path             = path;
            _skipNavigational = skipNavigational;
            _skipHidden       = skipHidden;

            _endsWithSeparator = _path.EndsWith(FileInfo.Separator);

            _directory = new Directory();
            _directory.Open(path).ThrowIfNecessary(msg =>
            {
                _directory.Dispose();

                return(new IOException(msg));
            });

            _directory.ListDirBegin(skipNavigational, skipHidden);
        }