📄 servicefile.java
字号:
package open;
// Basic Java object used to represent a J2SE File object
// Provides custom wrapper for file-centric data as needed by application
// TODO: Investigate feasibility of leveraging java.io.File directly
public class ServiceFile {
// Class properties reflect file-centric data
public String name = null;
public String path = null;
public boolean file = false;
public long size = 0;
public long modified = 0;
public boolean children = false;
// Various constructors used for different purposes
// For example a directory list needs different information than a complete file list
public ServiceFile() {;}
public ServiceFile( String name, String path, boolean file ) {
setName( name );
setPath( path );
setFile( file );
}
public ServiceFile( String name, String path, boolean file, boolean children ) {
setName( name );
setPath( path );
setFile( file );
setChildren( children );
}
public ServiceFile( String name, String path, boolean file, long size, long modified ) {
setName( name );
setPath( path );
setFile( file );
setSize( size );
setModified( modified );
}
// Access methods for properties follow
public void setName( String name ) {
this.name = name;
}
public String getName() {
return name;
}
public void setPath( String path ) {
this.path = path;
}
public String getPath() {
return path;
}
public void setFile( boolean file ) {
this.file = file;
}
public boolean getFile() {
return file;
}
public void setSize( long size ) {
this.size = size;
}
public long getSize() {
return size;
}
public void setModified( long modified ) {
this.modified = modified;
}
public long getModified() {
return modified;
}
public void setChildren( boolean children ) {
this.children = children;
}
public boolean getChildren() {
return children;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -