Skip to main content

Storage

Recursos de gestão de ficheiros da aplicação.


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, path: 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.
pathstringRelative 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, path: 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.
pathstringRelative 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

Return

( Storage )


extension


_storage.extension() : string

Description

Gets the file extension.

Return

( string )

The file extension.


file


_storage.file() : File

Description

File manipulation object of the storage being used.

Return

( File )

It allows to interact with the file physically.


filesystem


_storage.filesystem(folder: string, path: 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.
pathstringRelative 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, path: 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.
pathstringRelative 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

Folder manipulation object of 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

Return

( InputStream )


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

Return

( OutputStream )


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(charset: string) : boolean

Description

Checks whether the file name contains the extension.

Attributes
NAMETYPEDESCRIPTION
charsetstringFile 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 it 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 it is a folder.


newRandomFile


_storage.newRandomFile(charset: 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
charsetstringFile 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() : string

Description

Gets the path of the storage being used.

Return

( string )

The path of the storage.


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.


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.