AssetTree

public class AssetTree

Class AssetTree. Provides assettree functionality for the Hytale server.

java.lang.Object > AssetTree

Field Summary

stamp

final long stamp

Field stamp.

pathString

final String pathString

Field pathString.

assets

final List assets

Field assets.

index

final int index

Field index.

fileIndex

final int fileIndex

Field fileIndex.

hasFile

final boolean hasFile

Field hasFile.

name

final String name

Field name.

entry

final AssetEditorFileEntry entry

Field entry.

pathPrefix

final String pathPrefix

Field pathPrefix.

asset

final AssetEditorFileEntry asset

Field asset.

start

final long start

Field start.

assetTypePaths

final Set assetTypePaths

Field assetTypePaths.

subPaths

final Set subPaths

Field subPaths.

assetTypePath

final String assetTypePath

Field assetTypePath.

path

final Path path

Field path.

dirPath

final Path dirPath

Field dirPath.

name2

final String name2

Field name2.

Method Detail

AssetTree

public public AssetTree (final Path rootPath, final String packKey, final boolean isReadOnly, final boolean canBeDeleted)

Method AssetTree.

Parameters:
final Path rootPath
final String packKey
final boolean isReadOnly
final boolean canBeDeleted

replaceAssetTree

public void replaceAssetTree (@Nonnull final AssetTree assetTree)

Method replaceAssetTree.

Parameters:
@Nonnull final AssetTree assetTree

sendPackets

public void sendPackets (@Nonnull final EditorClient editorClient)

Method sendPackets.

Parameters:
@Nonnull final EditorClient editorClient

AssetEditorAssetListSetup

public new AssetEditorAssetListSetup (this.packKey, this.isReadOnly, this.canBeDeleted, AssetEditorFileTree.Server, this.serverAssets.toArray(AssetEditorFileEntry[]::new)

Method AssetEditorAssetListSetup.

Parameters:
this.packKey this.packKey
this.isReadOnly this.isReadOnly
this.canBeDeleted this.canBeDeleted
AssetEditorFileTree.Server AssetEditorFileTree.Server
this.serverAssets.toArray(AssetEditorFileEntry[]::new this.serverAssets.toArray(AssetEditorFileEntry[]::new

isDirectoryEmpty

public boolean isDirectoryEmpty (@Nonnull final Path path)

Method isDirectoryEmpty.

Parameters:
@Nonnull final Path path

ensureAsset

public AssetEditorFileEntry ensureAsset (@Nonnull final Path path, final boolean isDirectory)

Method ensureAsset.

Parameters:
@Nonnull final Path path
final boolean isDirectory

AssetEditorFileEntry

public new AssetEditorFileEntry (name, true)

Method AssetEditorFileEntry.

Parameters:
name name
true true

getAssetFile

public AssetEditorFileEntry getAssetFile (@Nonnull final Path path)

Method getAssetFile.

Parameters:
@Nonnull final Path path

removeAsset

public AssetEditorFileEntry removeAsset (@Nonnull final Path path)

Method removeAsset.

Parameters:
@Nonnull final Path path

applyAssetChanges

public void applyAssetChanges (@Nonnull final Map createdDirectories, @Nonnull final Map modifiedAssets)

Method applyAssetChanges.

Parameters:
@Nonnull final Map createdDirectories
@Nonnull final Map modifiedAssets

if

public else if (file.state == AssetState.DELETED)

Method if.

Parameters:
file.state == AssetState.DELETED

getAssetListForPath

private List getAssetListForPath (@Nonnull final Path path)

Method getAssetListForPath.

Parameters:
@Nonnull final Path path

IllegalArgumentException

public new IllegalArgumentException ("Invalid path " + String.valueOf(path)

Method IllegalArgumentException.

Parameters:
"Invalid path " + String.valueOf(path

load

private void load (@Nonnull final Collection assetTypes)

Method load.

Parameters:
@Nonnull final Collection assetTypes

loadServerAssets

static void loadServerAssets (@Nonnull final Path root, @Nonnull final Collection assetTypes, @Nonnull final List files)

Method loadServerAssets.

Parameters:
@Nonnull final Path root
@Nonnull final Collection assetTypes
@Nonnull final List files

walkFileTree

static void walkFileTree (@Nonnull final Path root, @Nonnull final Path dirPath, @Nonnull final List files)

Method walkFileTree.

Parameters:
@Nonnull final Path root
@Nonnull final Path dirPath
@Nonnull final List files

preVisitDirectory

public FileVisitResult preVisitDirectory (final Path path, final BasicFileAttributes attrs)

Method preVisitDirectory.

Parameters:
final Path path
final BasicFileAttributes attrs

visitFile

public FileVisitResult visitFile (@Nonnull final Path path, @Nonnull final BasicFileAttributes attrs)

Method visitFile.

Parameters:
@Nonnull final Path path
@Nonnull final BasicFileAttributes attrs