示例#1
0
        // RenameDirectory(buffer<bytes<0x301>, 0x19, 0x301> oldPath, buffer<bytes<0x301>, 0x19, 0x301> newPath)
        public ResultCode RenameDirectory(ServiceCtx context)
        {
            string oldName = ReadUtf8String(context, 0);
            string newName = ReadUtf8String(context, 1);

            return((ResultCode)_fileSystem.RenameDirectory(oldName, newName).Value);
        }
示例#2
0
        // RenameDirectory(buffer<bytes<0x301>, 0x19, 0x301> oldPath, buffer<bytes<0x301>, 0x19, 0x301> newPath)
        public ResultCode RenameDirectory(ServiceCtx context)
        {
            U8Span oldName = ReadUtf8Span(context, 0);
            U8Span newName = ReadUtf8Span(context, 1);

            return((ResultCode)_fileSystem.RenameDirectory(oldName, newName).Value);
        }
示例#3
0
        // RenameDirectory(buffer<bytes<0x301>, 0x19, 0x301> oldPath, buffer<bytes<0x301>, 0x19, 0x301> newPath)
        public long RenameDirectory(ServiceCtx context)
        {
            string oldName = ReadUtf8String(context, 0);
            string newName = ReadUtf8String(context, 1);

            try
            {
                _fileSystem.RenameDirectory(oldName, newName);
            }
            catch (HorizonResultException ex)
            {
                return(ex.ResultValue.Value);
            }

            return(0);
        }