[ 
https://issues.apache.org/jira/browse/TWILL-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15436197#comment-15436197
 ] 

ASF GitHub Bot commented on TWILL-188:
--------------------------------------

Github user chtyim commented on a diff in the pull request:

    https://github.com/apache/twill/pull/3#discussion_r76174737
  
    --- Diff: 
twill-common/src/main/java/org/apache/twill/filesystem/Location.java ---
    @@ -53,11 +54,42 @@
        * Atomically creates a new, empty file named by this abstract pathname 
if and only if a file with this name
        * does not yet exist.
        * @return {@code true} if the file is successfully create, {@code 
false} otherwise.
    -   * @throws IOException
    +   * @throws IOException if error encountered during creationg of the file
        */
       boolean createNew() throws IOException;
     
       /**
    +   * Atomically creates a new, empty file named by this abstract pathname 
if and only if a file with this name
    +   * does not yet exist. The newly created file will have permission set 
based on the given permission settings.
    +   *
    +   * @param permission A permission string. It has to be either a three 
digits or a nine characters string.
    +   *                   For the three digits string, it is similar to the 
UNIX permission numeric representation.
    +   *                   The first digit is the permission for owner, second 
digit is the permission for group and
    +   *                   the third digit is the permission for all.
    +   *                   For the nine characters string, it uses the format 
as specified by the
    +   *                   {@link PosixFilePermissions#fromString(String)} 
method.
    +   * @return {@code true} if the file is successfully create, {@code 
false} otherwise.
    +   * @throws IOException if error encountered during creationg of the file
    +   */
    +  boolean createNew(String permission) throws IOException;
    +
    +  /**
    +   * Returns the permissions of this {@link Location}. The permission 
string is a nine characters string as the format
    --- End diff --
    
    fixed


> LocationFactory should have options to accept permission for create
> -------------------------------------------------------------------
>
>                 Key: TWILL-188
>                 URL: https://issues.apache.org/jira/browse/TWILL-188
>             Project: Apache Twill
>          Issue Type: Improvement
>            Reporter: Shankar Selvam
>            Assignee: Terence Yim
>             Fix For: 0.8.0
>
>
> Currently LocationFactory and Location API doesn't have a way to specify the 
> permission to use for creating the path.  we need a way to specify the 
> permission for create and other operations on Location



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to