public void CreateFile(string path, long size, CreateFileOptions options)
        {
            string fullPath = GetFullPath(PathTools.Normalize(path));

            lock (Locker)
            {
                BaseFs.CreateFile(fullPath, size, options);
            }
        }
Example #2
0
        protected override Result CreateFileImpl(string path, long size, CreateFileOptions options)
        {
            string fullPath = GetFullPath(PathTools.Normalize(path));

            lock (Locker)
            {
                return(BaseFs.CreateFile(fullPath, size, options));
            }
        }
        protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options)
        {
            Unsafe.SkipInit(out FsPath fullPath);

            Result rc = ResolveFullPath(fullPath.Str, path);

            if (rc.IsFailure())
            {
                return(rc);
            }

            lock (Locker)
            {
                return(BaseFs.CreateFile(fullPath, size, options));
            }
        }
        protected override Result DoCreateFile(U8Span path, long size, CreateFileOptions options)
        {
            FsPath fullPath;

            unsafe { _ = &fullPath; } // workaround for CS0165

            Result rc = ResolveFullPath(fullPath.Str, path);

            if (rc.IsFailure())
            {
                return(rc);
            }

            lock (Locker)
            {
                return(BaseFs.CreateFile(fullPath, size, options));
            }
        }