Exemplo n.º 1
0
        private static Result MountCodeImpl(this FileSystemClient fs, out CodeVerificationData verificationData,
                                            U8Span mountName, U8Span path, ProgramId programId)
        {
            Unsafe.SkipInit(out verificationData);

            Result rc = MountHelpers.CheckMountName(mountName);

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

            rc = FspPath.FromSpan(out FspPath fsPath, path);
            if (rc.IsFailure())
            {
                return(rc);
            }

            IFileSystemProxyForLoader fsProxy = fs.GetFileSystemProxyForLoaderServiceObject();

            rc = fsProxy.OpenCodeFileSystem(out IFileSystem codeFs, out verificationData, in fsPath, programId);
            if (rc.IsFailure())
            {
                return(rc);
            }

            return(fs.Register(mountName, codeFs));
        }
Exemplo n.º 2
0
        public static Result IsArchivedProgram(this FileSystemClient fs, out bool isArchived, ProcessId processId)
        {
            IFileSystemProxyForLoader fsProxy = fs.GetFileSystemProxyForLoaderServiceObject();

            return(fsProxy.IsArchivedProgram(out isArchived, processId.Value));
        }