Java Code Examples for com.ruoyi.framework.web.domain.server.SysFile

The following examples show how to use com.ruoyi.framework.web.domain.server.SysFile. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: supplierShop   Source File: Server.java    License: MIT License 6 votes vote down vote up
/**
 * 设置磁盘信息
 */
private void setSysFiles(OperatingSystem os)
{
    FileSystem fileSystem = os.getFileSystem();
    OSFileStore[] fsArray = fileSystem.getFileStores();
    for (OSFileStore fs : fsArray)
    {
        long free = fs.getUsableSpace();
        long total = fs.getTotalSpace();
        long used = total - free;
        SysFile sysFile = new SysFile();
        sysFile.setDirName(fs.getMount());
        sysFile.setSysTypeName(fs.getType());
        sysFile.setTypeName(fs.getName());
        sysFile.setTotal(convertFileSize(total));
        sysFile.setFree(convertFileSize(free));
        sysFile.setUsed(convertFileSize(used));
        sysFile.setUsage(Arith.mul(Arith.div(used, total, 4), 100));
        sysFiles.add(sysFile);
    }
}
 
Example 2
Source Project: RuoYi-Vue   Source File: Server.java    License: MIT License 6 votes vote down vote up
/**
 * 设置磁盘信息
 */
private void setSysFiles(OperatingSystem os)
{
    FileSystem fileSystem = os.getFileSystem();
    OSFileStore[] fsArray = fileSystem.getFileStores();
    for (OSFileStore fs : fsArray)
    {
        long free = fs.getUsableSpace();
        long total = fs.getTotalSpace();
        long used = total - free;
        SysFile sysFile = new SysFile();
        sysFile.setDirName(fs.getMount());
        sysFile.setSysTypeName(fs.getType());
        sysFile.setTypeName(fs.getName());
        sysFile.setTotal(convertFileSize(total));
        sysFile.setFree(convertFileSize(free));
        sysFile.setUsed(convertFileSize(used));
        sysFile.setUsage(Arith.mul(Arith.div(used, total, 4), 100));
        sysFiles.add(sysFile);
    }
}
 
Example 3
Source Project: ruoyiplus   Source File: Server.java    License: MIT License 6 votes vote down vote up
/**
 * 设置磁盘信息
 */
private void setSysFiles(OperatingSystem os)
{
    FileSystem fileSystem = os.getFileSystem();
    OSFileStore[] fsArray = fileSystem.getFileStores();
    for (OSFileStore fs : fsArray)
    {
        long free = fs.getUsableSpace();
        long total = fs.getTotalSpace();
        long used = total - free;
        SysFile sysFile = new SysFile();
        sysFile.setDirName(fs.getMount());
        sysFile.setSysTypeName(fs.getType());
        sysFile.setTypeName(fs.getName());
        sysFile.setTotal(convertFileSize(total));
        sysFile.setFree(convertFileSize(free));
        sysFile.setUsed(convertFileSize(used));
        sysFile.setUsage(Arith.mul(Arith.div(used, total, 4), 100));
        sysFiles.add(sysFile);
    }
}
 
Example 4
Source Project: supplierShop   Source File: Server.java    License: MIT License 4 votes vote down vote up
public List<SysFile> getSysFiles()
{
    return sysFiles;
}
 
Example 5
Source Project: supplierShop   Source File: Server.java    License: MIT License 4 votes vote down vote up
public void setSysFiles(List<SysFile> sysFiles)
{
    this.sysFiles = sysFiles;
}
 
Example 6
Source Project: RuoYi-Vue   Source File: Server.java    License: MIT License 4 votes vote down vote up
public List<SysFile> getSysFiles()
{
    return sysFiles;
}
 
Example 7
Source Project: RuoYi-Vue   Source File: Server.java    License: MIT License 4 votes vote down vote up
public void setSysFiles(List<SysFile> sysFiles)
{
    this.sysFiles = sysFiles;
}
 
Example 8
Source Project: ruoyiplus   Source File: Server.java    License: MIT License 4 votes vote down vote up
public List<SysFile> getSysFiles()
{
    return sysFiles;
}
 
Example 9
Source Project: ruoyiplus   Source File: Server.java    License: MIT License 4 votes vote down vote up
public void setSysFiles(List<SysFile> sysFiles)
{
    this.sysFiles = sysFiles;
}