Skip to main content

Storage

Application file management resources that are located in the storage folder.


absolutePath​


_storage.absolutePath() : string​

Description​

Gets the absolute path to the storage being used.

Return​

( string )

The absolute storage path.


database​


_storage.database(table: string) : Storage​

Description​

Starts a new storage for the folder where the files of a table that represent a form are.

Attributes​
NAMETYPEDESCRIPTION
tablestringName of the table that is also the name of the form.
Return​

( Storage )

New storage started for the database table.


_storage.database(table: string, field: string) : Storage​

Description​

Starts a new storage for the folder where the files of a specific column of a table are located that represents a field of a form.

Attributes​
NAMETYPEDESCRIPTION
tablestringName of the table that is also the name of the form.
fieldstringColumn name which is also the same as the field name on the form.
Return​

( Storage )

New storage started for a database table column.


_storage.database(table: string, field: string, subpath: string) : Storage​

Description​

Starts a new storage for a specific path where the files for a specific column of a table are located that represent a field on a form.

Attributes​
NAMETYPEDESCRIPTION
tablestringName of the table that is also the name of the form.
fieldstringColumn name which is also the same as the field name on the form.
subpathstringRelative additional path, usually the name of the file, but it can be a more complex path.
Return​

( Storage )

New storage started for the specific path from a column in a database table.


_storage.database(table: string, field: string, subpath: string, fileName: string) : Storage​

Description​

Starts a new storage for a specific path where the files for a specific column of a table are located that represent a field on a form.

Attributes​
NAMETYPEDESCRIPTION
tablestringName of the table that is also the name of the form.
fieldstringColumn name which is also the same as the field name on the form.
subpathstringRelative additional path, usually the name of the file, but it can be a more complex path.
fileNamestringPossibility to add the file name separately if there is a very complex, very unusual path structure.
Return​

( Storage )

New storage started for the specific path from a column in a database table.


ensurePath​


_storage.ensurePath() : Storage​

Description​

Ensures that the folder path exists in the storage; if it doesn't, it will be created.

Return​

( Storage )

The storage instance itself.


extension​


_storage.extension() : string​

Description​

Gets the file extension.

Return​

( string )

The file extension.


file​


_storage.file() : File​

Description​

Object for manipulating the file located in the storage being used.

Return​

( File )

It allows to interact with the file physically.


filesystem​


_storage.filesystem(folder: string, subpath: string) : Storage​

Description​

Starts a new storage for a specific filesystem path within the storage.

Attributes​
NAMETYPEDESCRIPTION
folderstringName of the folder inside the storage/filesystem, it will usually be public, private or server.
subpathstringRelative additional path, usually the name of the file, but it can be a more complex path.
Return​

( Storage )

New storage started for the specific path from the storage filesystem.


_storage.filesystem(folder: string, subpath: string, fileName: string) : Storage​

Description​

Starts a new storage for a specific filesystem path within the storage.

Attributes​
NAMETYPEDESCRIPTION
folderstringName of the folder inside the storage/filesystem, it will usually be public, private or server.
subpathstringRelative additional path, usually the name of the file, but it can be a more complex path.
fileNamestringPossibility to add the file name separately if there is a very complex path structure.
Return​

( Storage )

New storage started for the specific path from the storage filesystem.


folder​


_storage.folder() : File​

Description​

Object for manipulating the folder located in the storage being used.

Return​

( File )

It allows to interact with the folder physically.


fullPath​


_storage.fullPath() : string​

Description​

Gets the full path to the storage being used.

Return​

( string )

The full storage path.


getBase​


_storage.getBase() : string​

Description​

Gets the base path of the storage being used.

Return​

( string )

The base path of the storage.


getInput​


_storage.getInput() : InputStream​

Description​

Gets the input object from Netuno for the storage being used.

Return​

( InputStream )

Data input object from Netuno to the storage in use.


getInputStream​


_storage.getInputStream() : InputStream​

Description​

Gets the Java input object for the storage being used.

Return​

( InputStream )

Java data input object for the storage in use.


getOutput​


_storage.getOutput() : OutputStream​

Description​

Gets the output object from Netuno for the storage being used.

Return​

( OutputStream )

Data output object from Netuno to the storage in use.


getOutputStream​


_storage.getOutputStream() : OutputStream​

Description​

Gets the Java output object for the storage being used.

Return​

( OutputStream )

Java data output object for the storage in use.


input​


_storage.input() : InputStream​

Description​

Gets the input object from Netuno for the storage being used.

Return​

( InputStream )

Data input object from Netuno to the storage in use.


inputStream​


_storage.inputStream() : InputStream​

Description​

Gets the Java input object for the storage being used.

Return​

( InputStream )

Java data input object for the storage in use.


isDatabase​


_storage.isDatabase() : boolean​

Description​

Whether storage is defined in the database folder.

Return​

( boolean )

If you are using the database folder.


isExtension​


_storage.isExtension(extension: string) : boolean​

Description​

Checks whether the file name contains the extension.

Attributes​
NAMETYPEDESCRIPTION
extensionstringFile name extension.
Return​

( boolean )

Whether the file contains the defined extension.


isFile​


_storage.isFile() : boolean​

Description​

Checks whether it is a file.

Return​

( boolean )

If is a file.


isFileSystem​


_storage.isFileSystem() : boolean​

Description​

Whether storage is defined in the filesystem folder.

Return​

( boolean )

If you are using the filesystem folder.


isFileSystemPrivate​


_storage.isFileSystemPrivate() : boolean​

Description​

Whether storage is defined in the filesystem's private folder.

Return​

( boolean )

If you are using the filesystem's private folder.


isFileSystemPublic​


_storage.isFileSystemPublic() : boolean​

Description​

Whether storage is defined in the filesystem's public folder.

Return​

( boolean )

If you are using the filesystem's public folder.


isFileSystemServer​


_storage.isFileSystemServer() : boolean​

Description​

Whether storage is defined in the filesystem's server folder.

Return​

( boolean )

If you are using the filesystem server folder.


isFolder​


_storage.isFolder() : boolean​

Description​

Checks whether it is a folder.

Return​

( boolean )

If is a folder.


newRandomFile​


_storage.newRandomFile(extension: string) : Storage​

Description​

Generates a new storage from the current storage but for a file with a random name that does not yet exist and thus can be saved without conflicts.

Attributes​
NAMETYPEDESCRIPTION
extensionstringFile name extension.
Return​

( Storage )

New storage for a new file with a non-existent random name.


output​


_storage.output() : OutputStream​

Description​

Gets the output object from Netuno for the storage being used.

Return​

( OutputStream )

Data output object from Netuno to the storage in use.


outputStream​


_storage.outputStream() : OutputStream​

Description​

Gets the Java output object for the storage being used.

Return​

( OutputStream )

Java data output object for the storage in use.


path​


_storage.path() : File​

Description​

Retrieves the manipulation object for the path in storage that is being used.

Return​

( File )

It allows to interact with the path physically.


reader​


_storage.reader() : java.io.Reader​

Description​

Gets the input object as Java text for the storage being used.

Return​

( java.io.Reader )

Input object as Java text for the storage in use.


readerBOM​


_storage.readerBOM() : java.io.Reader​

Description​

Gets the data entry object as BOM text (byte order mark) from Java for the storage being used.

Return​

( java.io.Reader )

Java text input object (BOM) for the storage in use.


_storage.readerBOM(charset: string) : java.io.Reader​

Description​

Gets the data entry object as BOM text (byte order mark) from Java for the storage being used.

Attributes​
NAMETYPEDESCRIPTION
charsetstringCharacter encoding type code such as:
- US-ASCII
- ISO-8859-1
- UTF-8
- UTF-16BE
- UTF-16LE
- UTF-16
Return​

( java.io.Reader )

Java text input object (BOM) for the storage in use.


saveFile​


_storage.saveFile(file: File) : void​

Description​

Save the file in the current storage path.

Attributes​
NAMETYPEDESCRIPTION
fileFileFile that will be saved in the current storage.
Return​

( void )


setBase​


_storage.setBase(base: string) : boolean​

Description​

Defines the base path of the storage to be used.

Attributes​
NAMETYPEDESCRIPTION
basestringThe base path of the storage.
Return​

( boolean )

Whether the path is valid and has been defined.


subpath​


_storage.subpath() : string​

Description​

Gets the subpath of the storage being used.

Return​

( string )

The subpath of the storage.


url​


_storage.url() : string​

Description​

Gets the URL of the storage being used.

Return​

( string )

The URL for the storage.


writer​


_storage.writer() : java.io.Writer​

Description​

Gets the output object as Java text for the storage being used.

Return​

( java.io.Writer )

Output object as Java text for the storage in use.